shape-outside-linear-gradient-001.html (1582B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Test: Left float with linear gradient</title> 5 <link rel="author" title="Bear Travis" href="mailto:betravis@adobe.com"/> 6 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shapes-from-image"/> 7 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"/> 8 <link rel="match" href="reference/shape-outside-linear-gradient-001-ref.html"/> 9 <meta name="flags" content="ahem"/> 10 <meta name="assert" content="This test verifies that shape-outside respects a 11 simple linear gradient."/> 12 <meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-8700"/> 13 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 14 <style type="text/css"> 15 .container { 16 width: 200px; 17 height: 200px; 18 background-color: red; 19 font-family: Ahem; 20 font-size: 50px; 21 line-height: 1; 22 } 23 #test { 24 color: green; 25 } 26 #gradient { 27 float: left; 28 width: 200px; 29 height: 200px; 30 background: linear-gradient(to right, green 50%, transparent 50%); 31 shape-outside: linear-gradient(to right, rgba(51, 51, 51, 1) 0%, rgba(51, 51, 51, 0.5) 50%, transparent 50%); 32 } 33 </style> 34 </head> 35 <body> 36 <p> 37 The test passes if you see a green square. There should be no red. 38 </p> 39 <div id="test" class="container"> 40 <div id="gradient"></div> 41 xx xx xx xx 42 </div> 43 </body> 44 </html>