gradient-html-06d.html (857B)
1 <!-- 2 Any copyright is dedicated to the Public Domain. 3 http://creativecommons.org/licenses/publicdomain/ 4 Ensure that -moz-element using an SVG gradient is affected by 5 mozSetImageElement. 6 --> 7 <!DOCTYPE html> 8 <html> 9 <body style="margin:0"> 10 <div style="width:300px; height:300px; background-image:-moz-element(#g)"></div> 11 <svg> 12 <linearGradient id="green" gradientUnits="objectBoundingBox" x2="0" y2="1"> 13 <stop stop-color="lime" offset="0"></stop> 14 <stop stop-color="black" offset="1"></stop> 15 </linearGradient> 16 <linearGradient id="g" gradientUnits="objectBoundingBox" x2="0" y2="1"> 17 <stop stop-color="red" offset="0"></stop> 18 <stop stop-color="black" offset="1"></stop> 19 </linearGradient> 20 </svg> 21 <script>document.mozSetImageElement("g", document.getElementById("green"));</script> 22 </body> 23 </html>