您的位置首页百科问答

打开SVG图片网页出现提示信息error on line..

打开SVG图片网页出现提示信息error on line..

的有关信息介绍如下:

打开SVG图片网页出现提示信息error on line..

通过Google(也可以通过其他浏览器打开)打开SVG格式的矢量图

图片能正常显示,但是页面出现错误提示:

This page contains the following errors:

error on line 11 at column 7: Opening and ending tag mismatch: path line 0 and svg

Below is a rendering of the page up to the first error.

意思是第7行的结束标签missing丢失了

再次检查代码,问题出现在除去注释代码后的第7行,如图所示,出现问题的代码显示在第10行,这是因为前面有三行绿色的是注释代码,浏览器运行代码报错没有读取注释代码

将出现错误的代码加上结束符号“/”

再次通过Google查看SVG图片,网页不再报错

建立一个html文件“img.html”,通过html引入,html文件代码如下