perspective-origin-001.html (1268B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Transforms Test: perspective-origin - 0px center('center' computes to '50%' in vertical position)</title> 4 <link rel="author" title="Intel" href="http://www.intel.com"> 5 <link rel="author" title="Jieqiong Cui" href="mailto:jieqiongx.cui@intel.com"> 6 <link rel="help" title="11. The 'perspective-origin' Property" href="http://www.w3.org/TR/css-transforms-2/#propdef-perspective-origin"> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 8 <meta name="assert" content="The 'perspective-origin' property set 'center' computes to 50% for the vertical position."> 9 <style> 10 div { 11 height: 100px; 12 position: absolute; 13 width: 100px; 14 } 15 #test { 16 perspective: 2px; 17 perspective-origin: 0px center; 18 } 19 #redSquare { 20 background-color: red; 21 transform: translateZ(0px); 22 } 23 #ref { 24 perspective: 2px; 25 perspective-origin: 0px 50%; 26 } 27 #greenSquare { 28 background-color: green; 29 height: 50px; 30 top: 25px; 31 transform: translateZ(1px); 32 width: 50px; 33 } 34 </style> 35 <body> 36 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 37 <div id="test"><div id="redSquare"></div></div> 38 <div id="ref"><div id="greenSquare"></div></div> 39 </body>