Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<head>
<title>CSS Transforms Test: perspective property</title>
<link rel="author" title="Francisca Gil" href="mailto:pancha0.0@gmail.com">
<link rel="reviewer" title="Apple Inc." href="http://www.apple.com">
<link rel="match" href="reference/perspective-reftest.html">
<meta name="assert" content="Asserts that origin '<x,y>' visually moves the objects '<-x,-y>*d/(d-1)' ">
<style type="text/css">
.container {
position: absolute;
width: 150px;
height: 150px;
top: 100px;
left: 100px;
perspective: 3px;
perspective-origin: 0px 0px;
}
.redSquare {
position: absolute;
top: 0px;
left: 0px;
width: 150px;
height: 150px;
background: red;
transform: translateZ(0px);
}
.greenSquare {
position: absolute;
top: 0px;
left: 0px;
width: 100px;
height: 100px;
background: green;
transform: translateZ(1px);
}
</style>
</head>
<body>
<p>The test passes if there is a green square and no red.</p>
<div class="container">
<div class="redSquare"></div>
<div class="greenSquare"></div>
</div>
</body>
</html>