<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Transform and positioned ancestor</title> | |
<style type="text/css" media="screen"> | |
#wrapper { | |
border: 1px solid black; | |
position: relative; | |
width: 300px; | |
} | |
.container { | |
height: 200px; | |
width: 200px; | |
margin: 50px; | |
background-color: gray; | |
-webkit-transform: rotate(0); | |
} | |
.box { | |
position: absolute; | |
left: 50px; | |
top: 50px; | |
height: 100px; | |
width: 100px; | |
background-color: red; | |
} | |
.green-box { | |
position: absolute; | |
left: 100px; | |
top: 100px; | |
height: 100px; | |
width: 100px; | |
background-color: green; | |
} | |
</style> | |
</head> | |
<body> | |
<p>You should see a green box inside a gray box. If you see red, the test has failed. <a href="https://bugs.webkit.org/show_bug.cgi?id=18885">https://bugs.webkit.org/show_bug.cgi?id=18885</a> | |
</p> | |
<div id="wrapper"> | |
<div class="container"> | |
<div class="box"></div> | |
</div> | |
<div class="green-box"></div> | |
</div> | |
</body> | |
</html> |