<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body { | |
height: 2000px; | |
} | |
.container { | |
height: 200px; | |
width: 300px; | |
border: 4px solid black; | |
overflow-y: scroll; | |
resize: both; | |
} | |
.contents { | |
height: 1000px; | |
} | |
.box { | |
position: relative; | |
z-index: 1; | |
height: 100px; | |
width: 100px; | |
margin: 10px; | |
background-color: blue; | |
} | |
.surface { | |
opacity: 0.5; | |
} | |
#fixed { | |
position: fixed; | |
z-index: 0; | |
background-color: green; | |
left: 50px; | |
top: 200px; | |
height: 200px; | |
width: 200px; | |
} | |
</style> | |
</head> | |
<!-- | |
This test ensures that render surfaces grow to accomodate clip children. | |
If this test is working, you should see that the green box is square. | |
--> | |
<body> | |
<div class="surface"> | |
<div class="box"></div> | |
<div class="container"> | |
<div> | |
<div class="box"></div> | |
<div class="container"> | |
<div id="fixed"></div> | |
<div class="box"></div> | |
<div class="box"></div> | |
<div class="box"></div> | |
<div class="box"></div> | |
<div class="box"></div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |