transform-translate-004.html (935B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Test (Transforms): translate() plus relative positioning</title> 5 <link rel="author" title="Keith Schwarz" href="mailto:keith@keithschwarz.com"> 6 <link rel="author" title="Aryeh Gregor" href="mailto:ayg@aryeh.name"> 7 <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#two-d-transform-functions"> 8 <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#funcdef-transform-translate"> 9 <meta name="assert" content='This tests that translate(25px, 25px) 10 plus relative positioning 25px to the bottom right is the same as relative 11 positioning by 50px toward the bottom right.'> 12 <link rel="match" href="transform-translate-ref.html"> 13 <style> 14 div { 15 transform: translate(25px, 25px); 16 position: relative; 17 top: 25px; 18 left: 25px; 19 } 20 </style> 21 </head> 22 <body> 23 <div>Test Text</div> 24 </body> 25 </html>