我已经为svg编写了代码。它像HTML文件类型一样工作正常。但是,当我将文件扩展名从.html更改为.svg时,它不起作用。有什么解决方案?我的代码
<svg>
<circle r="50%" fill="#e60" />
<circle r="45%" fill="#e50" />
<circle r="40%" fill="#e40" />
<circle r="35%" fill="#e30" />
<circle r="30%" fill="#e20" />
<circle r="25%" fill="#e10" />
</svg>
我不是专业的SVG,但是我已经将其修复为:https://jsbin.com/xonazavadu/edit?html,output
<svg xmlns="http://www.w3.org/2000/svg">
<circle r="50%" fill="#e60" />
<circle r="45%" fill="#e50" />
<circle r="40%" fill="#e40" />
<circle r="35%" fill="#e30" />
<circle r="30%" fill="#e20" />
<circle r="25%" fill="#e10" />
</svg>