老师,我的查看不了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>
This XML file does not appear to have any style information associated with it. The document tree is shown below.
1回答
同学你好,如果是svg文件需要添加xmlns属性,如下:
xmlns="http://www.w3.org/2000/svg"
命名空间声明由xmlns属性提供,此属性表示<svg>标记及其子标记属于名称空间为“http://www.w3.org/2000/svg”的XML语言。
添加之后就有效果了,自己可以测试下。
祝学习愉快!
相似问题