linear-gradient-non-square.html (719B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>Linear gradients for non-square elements</title> 4 <link rel="help" href="https://drafts.csswg.org/css-images/#linear-gradients"> 5 <link rel="match" href="reference/linear-gradient-non-square-ref.html"> 6 <style> 7 .a, 8 .b, 9 .c, 10 .d { 11 width: 200px; 12 height: 100px; 13 } 14 .a { 15 background: linear-gradient(to right bottom, black 50%, lightgray 50%); 16 } 17 .b { 18 background: linear-gradient(to left bottom, black 50%, lightgray 50%); 19 } 20 .c { 21 background: linear-gradient(to left top, black 50%, lightgray 50%); 22 } 23 .d { 24 background: linear-gradient(to right top, black 50%, lightgray 50%); 25 } 26 </style> 27 <div class="a"></div> 28 <div class="b"></div> 29 <div class="c"></div> 30 <div class="d"></div>