Mat*_*ost 2 javascript html5 svg
当我有一个带有JavaScript chrome的SVG图片时,说“资源被解释为文档,但以MIME类型image / svg + xml传输”。我可以将其包含在iframe中,也可以嵌入TAG相同的结果。但是,当我将mime类型更改为其他类型时,浏览器无法呈现它。所以我猜“ image / svg + xml”是正确的吗?
SVG
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg version="1.1" baseProfile="full" id="draw"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 480 480">
<defs>
<style type="text/css">
<![CDATA[
]]>
</style>
</defs>
<rect x="0" y="0" width="480" height="480" rx="0" ry="0" fill="rgb(255, 255, 255)" />
</g>
<script type="text/ecmascript"><![CDATA[
(function () {
//Some code here
}());
]]>
</script>
</svg>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2927 次 |
| 最近记录: |