background-size-041-ref.html (632B)
1 <!DOCTYPE html> 2 3 <title>CSS Reftest Reference</title> 4 5 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> 6 7 <style> 8 div#black-walls 9 { 10 border: solid 40px; 11 border-color: transparent black; 12 height: 400px; 13 width: 400px; 14 } 15 16 div#gradient 17 { 18 background-image: linear-gradient(orange, blue); 19 height: 100%; /* computes to 400px */ 20 margin: 0px auto; 21 /* the gradient block is horizontally centered inside div#black-walls */ 22 width: 200px; 23 } 24 </style> 25 26 <div id="black-walls"><div id="gradient"></div></div>