Initial commit
This commit is contained in:
39
PointerEventsNone/pointerEventsNone.html
Normal file
39
PointerEventsNone/pointerEventsNone.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
.wrapper {
|
||||
position: relative;
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
button {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
z-index: 2;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="wrapper">
|
||||
<button onclick="alert('Kliknięto przycisk!')">Kliknij mnie</button>
|
||||
<div class="overlay">x</div>
|
||||
</div>
|
||||
|
||||
<!--wiemy, że pointer-events: none; blokuje kliknięcie w .overlay, ale pytanie czy przycisk zostanie kliknięty?-->
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user