aboutsummaryrefslogtreecommitdiffstats
path: root/tests/html/shadow-hit-test.html
blob: fc9e5d31d7e56f2913aed32e1bd2d7d41d2e1d4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<!-- Clicking under the shadow should still activate the green div. -->
<style>
  .green {
    background: green;
    position: absolute;
    top: 45px;
    left: 170px;
    width: 100px;
    height: 50px;
  }
  .red {
    background: red;
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100px;
    height: 100px;
    box-shadow: 100px 0 0 rgba(0,0,0,0.1);
    transform: translateX(1px);
  }
</style>
<div class="green" onclick="console.log('You clicked me!')"></div>
<div class="red"></div>