惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Palo Alto Networks Blog
P
Proofpoint News Feed
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
罗磊的独立博客
J
Java Code Geeks
月光博客
月光博客
F
Full Disclosure
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
U
Unit 42
WordPress大学
WordPress大学
A
About on SuperTechFans
C
Cyber Attacks, Cyber Crime and Cyber Security
SecWiki News
SecWiki News
Security Latest
Security Latest
C
Check Point Blog
C
CERT Recently Published Vulnerability Notes
小众软件
小众软件
I
InfoQ
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
V
Visual Studio Blog
博客园_首页
NISL@THU
NISL@THU
I
Intezer
Spread Privacy
Spread Privacy
AWS News Blog
AWS News Blog
The Register - Security
The Register - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Latest news
Latest news
Project Zero
Project Zero
博客园 - 叶小钗
C
Cybersecurity and Infrastructure Security Agency CISA
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy International News Feed
博客园 - 【当耐特】
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threat Research - Cisco Blogs
Simon Willison's Weblog
Simon Willison's Weblog
T
Tor Project blog
V
Vulnerabilities – Threatpost
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网

HTML

想 vibe 一个日历 html 组件怎么都搞不好。。。 - V2EX 才知道 html5 有 dialog 标签 - V2EX 是不是搜索引擎跳转来的流量,都拿不到关键词了?用 referer 只获取到 www.bing.com www.google.com 这样的域名,无法获取到后面的关键词信息,有解决办法么? - V2EX 求一些 HTML 嵌入代码资源。 - V2EX 请教有没有办法知道选中的是哪一项? - V2EX H5 中加载生僻字体过慢求助 - V2EX 求问前端如何实现一个业务表格,要求能够固定首列,其余列滚动,点击一行在该行下展开一行且固定住,左右滑动其他列的时候固定的行不动? - V2EX [前端] 若一个 input 被双向数据绑定了,如何通过外部 js 设置该 input 的 value - V2EX element-ui 中 textarea 换行和空格回显最佳方案? - V2EX 关于正则表达式的问题,批量修改有相同内容的行 - V2EX html document 的字符编码问题: content-type 与 meta charset 的区别? - V2EX 如何把 bookmarks.html 转换成树状结构/下拉菜单的网页? - V2EX HTML 如何监听回车但忽视一些情况 - V2EX PHP 文件格式问题请教 - V2EX 求教:对于前端渲染来说,第一次打开某个 URL 和点击刷新这个 URL 有什么区别? - V2EX 招兼职, 来一个能帮忙改写 html - V2EX 在 Chrome 中浏览某网页,怎么删除或屏蔽 translate="no",正常使用网页翻译? - V2EX htmx 是复古?还是新潮流? - V2EX 大家对外提供开放平台接口的时候,文档该如何选型 - V2EX 关于 html 后台管理模板 - V2EX 现在 Web 开发大家用 H5 语义化标签还是用的 div+span 呀 - V2EX html5 推 rtmp 流的方案? - V2EX 现在(2021 年末)是否有任何的标准支持在一个 HTML 里 include 另外一个 HTML 文件的内容? - V2EX 虽然马上 2022 了,我还是不知道 section, article, aside 这些怎么用。 - V2EX 请问如何用 Xquery 生成 HTML table - V2EX html 中插入批量 img 图片问题 - V2EX 淘宝, 1688 链接后面的 spm 是跟踪用户操作的,请教一下它是怎么生成的吗?需要在代码中一个个添加,还是可以生成 html 的时候动态插入。请教下实现逻辑 - V2EX html 如何加入 http 基本认证 - V2EX html 前端有哪些显示 html、css、js、sql 等代码内容的 ui 插件吗? - V2EX 请问 html 文件中的 vbscript 语句本地文件可以运行,放到服务器上就不行。 - V2EX 喜欢 producthunt.com 的前端 css 模板,简洁直观。有类似的 html 模板可以使用吗,像 html5up.net 上这样的能开箱即用 - V2EX 给 V2EX 加壳😂 - V2EX H5 不同域名页面跳转如何携带 cookie - V2EX 为什么要解决 iframe 跨域问题? iframe 不是默认可以跨域的吗? - V2EX 将 h5 内嵌到别人的应用如何实现静默授权 - V2EX 给萌新 HTML5 入门指南(二) - V2EX 如何爬取网站背景图片 - V2EX 可否推荐一个在 remixOS 环境下使用的代码编辑器 - V2EX index.html 放在服务器上,浏览器输入地址链接是下载而不是打开 - V2EX <p>包不住<div>是强制的 w3c 标准?还是约定成俗的规范? - V2EX bootstrap 的弹框弹出来之后,后面的滚动条就没有了。有大佬知道怎么做吗 - V2EX 请问下网易运音乐网页版的滚动条是如何隐藏的? - V2EX 有人研究过 happi123.com 网站吗? - V2EX 关于拖拽和定位的问题 - V2EX Selenium 如何点击无链接的 a 标签 - V2EX 浏览器 html5 video 标签 - V2EX 为什么 html 不使用类似的 <include>...</include> 这样的模板语法? - V2EX
为啥 img 和 embed 标签对同一个 svg 展示效果不一样? - V2EX
est · 2023-10-17 · via HTML

这是一个创建于 971 天前的主题,其中的信息可能已经有所发展或是发生改变。

遇到个蛋痛事。对于同一个 1.svg ,页面里分别用 <img><embed> 嵌入

<img src="1.svg">

<embed src="1.svg">

前者不能展示 svg 内部的<image>图片 ,后者能展示。

在线 demo 有人遇到过这个问题吗?

sanmaozhao

1

sanmaozhao      2023 年 10 月 18 日   ❤️ 1

查到的资料说,img 标签嵌入的 svg ,是无法加载任何外部资源的
包含 svg 文件里引用的 image 、font 等

请看这个链接
https://vecta.io/blog/best-way-to-embed-svg

This is mainly because images with <img> tags are not allowed to refer to external resources including CSS, fonts and scripts, for security reasons.

但是我目前还没查到官方的文档说明

sanmaozhao

2

sanmaozhao      2023 年 10 月 18 日   ❤️ 2

找到权威一些的文档了,看来就是这个原因了

https://www.w3.org/wiki/SVG_Security

Markup languages like HTML (and SVG itself) can reference SVG as an image with the <img> tag (HTML namespace) or <image> tag (HTML or SVG namespace).

If an SVG file is fetched as image, then certain requirements apply to this document:

The SVG document is not allowed to fetch any resources. This also applies to scripts, stylesheets or images.

sanmaozhao

4

sanmaozhao      2023 年 10 月 18 日

哈哈,找到原因应该回复一下本贴啊

我也查了有一会儿,才找到根源

也是顺着几个链接找到的,和你博客里贴的基本相同