transform-3d-rotateY-stair-below-001.xht (1598B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: rotateY with perspective produces a trapezoid</title> 5 <link rel="author" title="Apple Inc." href="http://www.apple.com/"/> 6 <link rel="help" href="http://www.w3.org/TR/css-transforms-2/#3d-transform-rendering"/> 7 <link rel="match" href="reference/transform-3d-rotateY-stair-above-ref-001.xht"/> 8 <meta name="fuzzy" content="maxDifference=0-20;totalPixels=0-80" /> 9 <meta name="assert" content="A rotateY transform with perspective 10 should result in a trapezoid."/> 11 <style type="text/css"><![CDATA[ 12 div { 13 height: 150px; 14 width: 150px; 15 } 16 .background { 17 background-color: green; 18 height: 200px; 19 width: 200px; 20 } 21 .container { 22 position: absolute; 23 top: 20px; 24 left: 0; 25 perspective: 500px; 26 } 27 .transformed { 28 background-color: green; 29 transform: rotateY(50deg); 30 } 31 .stair { 32 background-color: red; 33 position: absolute; 34 } 35 #one { 36 width: 32px; 37 height: 158px; 38 top: 16px; 39 left: 21px; 40 } 41 #two { 42 width: 33px; 43 height: 146px; 44 top: 22px; 45 left: 53px; 46 } 47 #three { 48 width: 33px; 49 height: 134px; 50 top: 28px; 51 left: 85px; 52 } 53 .stairs { 54 height: 180px; 55 } 56 ]]></style> 57 </head> 58 <body> 59 <div class="background"> 60 <div class="stairs"> 61 <div id="one" class="stair"></div> 62 <div id="two" class="stair"></div> 63 <div id="three" class="stair"></div> 64 </div> 65 <div class="container"> 66 <div class="transformed"></div> 67 </div> 68 </div> 69 <p>You should see a green box. There should be no red.</p> 70 </body> 71 </html>