老师,我的查看不了svg文件

来源:2-1 viewport

浮木吟歌_

2019-04-23 13:52:10

<svg width="800" height="600" style="border:1px solid #f00;">
<rect width="40" height="30" fill="#abcdef"/>
</svg>

http://img.mukewang.com/climg/5cbea7e70001585309530105.jpg

This XML file does not appear to have any style information associated with it. The document tree is shown below.

写回答

1回答

好帮手慕星星

2019-04-23

同学你好,如果是svg文件需要添加xmlns属性,如下:

http://img.mukewang.com/climg/5cbebfb200014ad613040182.jpg

xmlns="http://www.w3.org/2000/svg"

命名空间声明由xmlns属性提供,此属性表示<svg>标记及其子标记属于名称空间为“http://www.w3.org/2000/svg”的XML语言。

添加之后就有效果了,自己可以测试下。

祝学习愉快!

0

0 学习 · 4826 问题

查看课程