svg - svg 填充 url 不适用于任何 Chrome 扩展页面,但适用于任何网站和本地文件
问题描述
我正在使用我的 Chrome 扩展程序:zzllrr Imager Geek 并发现 svg 填充 url 在任何 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>
解决方案
推荐阅读
- vb.net - VB.NET 从 0 到 4 舍入 --> 0 从 5 到 9 --> 1
- python - 如何在 Python 中将输入字符串更改为对象的名称
- azure - Azure 数据工厂查找活动无法执行 CosmosDb 查询“跨分区查询仅支持聚合的‘VALUE’。”
- android - 如何获取 ussd measage 字符串值?
- node.js - 如何通过多对多关系实体ID查找实体
- assembly - GRUB 如何在引导过程中将内核参数传递给内核
- c++ - C++ 同步和原子软件事务内存
- javascript - 如何在 ReactJS 中单击按钮重定向
- javascript - 由于类型不正确,Prisma 更新功能失败
- google-cloud-build - 修补 CloudBuild 触发器