background-position-three-four-values-ref.html (592B)
1 <!DOCTYPE html> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 5 <style type="text/css"> 6 div { 7 width: 200px; 8 height: 200px; 9 border: 2px solid black; 10 background-image: url("../support/blue_color.png"); 11 background-repeat: no-repeat; 12 display: inline-block; 13 } 14 .test1 { 15 background-position: 50px 50%; 16 } 17 .test2 { 18 background-position: 75% 75%; 19 } 20 .test3 { 21 background-position: 25px 25%; 22 } 23 .test4 { 24 background-position: 75% 75%; 25 } 26 </style> 27 28 </head> 29 <body> 30 31 <div class="test1"></div> 32 <div class="test2"></div> 33 <div class="test3"></div> 34 <div class="test4"></div> 35 36 </body> 37 </html>