Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第 104 期(W3C 标准-SVG):SVG优雅降级显示 #107

Open
wingmeng opened this issue Sep 6, 2019 · 0 comments
Open

第 104 期(W3C 标准-SVG):SVG优雅降级显示 #107

wingmeng opened this issue Sep 6, 2019 · 0 comments

Comments

@wingmeng
Copy link
Collaborator

wingmeng commented Sep 6, 2019

SVG 是一种矢量图形,在网页中既可以以 XML 形式插入,又可以使用 image 标签插入,是图标、logo 等色彩简单图形的理想格式。但是一些需要兼容低版本浏览器(例如 IE8)的场景下,需要对 SVG 进行优雅降级,以防在这类浏览器下 SVG 图形显示为空白。

<svg width="150" height="150">
  <!-- logo.png 为优雅降级所用的 png 图片 -->
  <image xlink:href="logo.svg" src="logo.png" width="150" height="150">
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant