background-size-percent-percent-stretch.html (589B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>background-size: 100% 100%; stretch</title> 5 <style type="text/css"> 6 #outer 7 { 8 border: 10px solid black; 9 width: 60px; 10 height: 120px; 11 } 12 #inner 13 { 14 width: 60px; 15 height: 120px; 16 background-image: url(blue-8x20-green-16x20.png); 17 background-repeat: no-repeat; 18 background-size: 100% 100%; 19 } 20 #innermost 21 { 22 width: 15px; 23 height: 120px; 24 25 /* obscure sampling artifacts at the color boundary */ 26 border-right: 10px solid black; 27 } 28 </style> 29 </head> 30 <body> 31 <div id="outer"><div id="inner"><div id="innermost"></div></div></div> 32 </body> 33 </html>