translate-optional-second-001.html (1267B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Transforms Test: transform property with translate function and one parameter</title> 5 <link rel="author" title="Jian Zhang" href="mailto:jian.andy.zhang@gmail.com"> 6 <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-property"> 7 <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#two-d-transform-functions"> 8 <link rel="match" href="reference/translate-optional-second-ref.html"> 9 <meta name="assert" content=" If the second parameter is not provided, it has zero as a value. This transform moves the element by 100 pixels in X direction."> 10 <style type="text/css"> 11 .greenSquare { 12 position: absolute; 13 top: 50px; 14 left: 0; 15 width: 100px; 16 height: 100px; 17 background: green; 18 transform: translate(100px); 19 } 20 .redSquare { 21 position: absolute; 22 top: 51px; 23 left: 101px; 24 width: 98px; 25 height: 98px; 26 background: red; 27 } 28 </style> 29 </head> 30 <body> 31 <p>The test passes if there is a green square and no red.</p> 32 <div class="redSquare"></div> 33 <div class="greenSquare"></div> 34 </body> 35 </html>