我有一个名为 graphics.svg
的文件,其中包含以下代码:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="400" height="110">
<rect width="400" height="110" style="fill:rgb(0,0,255);" />
</svg>
如果我从Web浏览器(Firefox、Chromium)打开该文件,向量图像将不会显示。相反,文件将以XML格式显示:This XML file does not appear to have any style information associated with it. The document tree is shown below.
<svg width="400" height="110">
<rect width="400" height="110" style="fill:rgb(0,0,255);"/>
</svg>
这是因为SVG文件应该嵌入到HTML文件中才能正常显示吗?