Я работаю над своим расширением Chrome: zzllrr Imager Geek и обнаружил, что URL-адрес заполнения 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>