我正在使用我的Chrome扩展程序:zzllrr Imager Geek,发现svg填充网址在任何Chrome扩展程序页面中均无效(URL以chrome-extension://开头)。
但是在普通网页(http:,https:,file://。)上,它的作用就像是一种魅力。下面是代码:
<svg id="LRectSq30821072" xmlns="http://www.w3.org/2000/svg" style="position: absolute; left: 66px; top: 155px; width: 76px; height: 76px; z-index: 2001; filter: none; transform: none;">
<defs>
<linearGradient id="LRectSq30821072linearfill" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color:#3f377d;stop-opacity:1"></stop>
<stop offset="34%" style="stop-color:#da310a;stop-opacity:1"></stop>
<stop offset="68%" style="stop-color:#cd2c78;stop-opacity:1"></stop>
<stop offset="100%" style="stop-color:#82a462;stop-opacity:1"></stop>
</linearGradient>
</defs>
<rect x="1" y="1" width="74" height="74" stroke-width="2" stroke="#585c1a" stroke-opacity="1" fill="url(#LRectSq30821072linearfill)" fill-opacity="1" stroke-dasharray="" stroke-dashoffset="1" stroke-linecap="butt" stroke-linejoin="miter"></rect>
</svg>