49 lines
1.0 KiB
HTML
49 lines
1.0 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<style>
|
|
.container {
|
|
position: absolute;
|
|
width: 400px;
|
|
height: 400px;
|
|
background: gray;
|
|
overflow: hidden;
|
|
z-index: 1;
|
|
}
|
|
|
|
.clipping {
|
|
position: absolute;
|
|
z-index: 3;
|
|
left: 50px;
|
|
top: 50px;
|
|
width: 300px;
|
|
height: 300px;
|
|
background: url('../resources/simple_image.png');
|
|
background-size: 100% 100%;
|
|
}
|
|
|
|
.inner {
|
|
position: absolute;
|
|
top: 50px;
|
|
left: 50px;
|
|
height: 200px;
|
|
width: 200px;
|
|
background-color: green;
|
|
}
|
|
|
|
.composited {
|
|
-webkit-transform: translateZ(0);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="clipping">
|
|
<div class="inner composited"></div>
|
|
</div>
|
|
</div>
|
|
<pre id="layers">Layer tree goes here in DRT</pre>
|
|
</body>
|
|
</html>
|