我有SVG图形的一个问题在我的网站上的IE10和11SVG图形不IE10规模和11
它工作正常,在谷歌,Chrome和Firefox,但无法在Internet Explorer。图形很小,我无法在IE上进行缩放。
的SVG对象写为:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 570 910" style="enable-background:new 0 0 570 910;" xml:space="preserve" class="style-svg rule-svg6 alignnone size-full wp-image-9121 replaced-svg">
这是其在CMS的WordPress
<img src="http://example.net/mps/noaccess/wp-content/uploads/2016/01/Prevalence-A.svg" alt="Prevalence-A" class="style-svg rule-svg2 alignnone size-full wp-image-9041" />
如何增加则说明没有安装一个插件,它渲染SVG: _HTTPS:// WordPress的。 org/plugins/svg-support/
此图形的每一行都由它自己的矩形组成。 所以,我的图形外观:
<g>
<rect x="220.2" y="196.2" class="rop110" width="736" height="28"></rect>
<rect x="220.2" y="106.2" class="rop110" width="699" height="28"></rect>
<rect x="220.2" y="256.2" class="rop110" width="829" height="28"></rect>
<rect x="220.2" y="76.2" class="rop110" width="642" height="28"></rect>
<rect x="220.2" y="226.2" class="rop110" width="456" height="28"></rect>
<rect x="220.2" y="46.2" class="rop110" width="365" height="28"></rect>
<rect x="220.2" y="166.2" class="rop110" width="596" height="28"></rect>
<rect x="220.2" y="136.2" class="rop110" width="141" height="28"></rect>
</g>
这是我对在谷歌,Chrome和Firefox和它的确定。
这是我在Internet Explorer(这是很小的)
而且我有一个svg.image.css与此代码:
svg.style-svg {display: inline-block;
position: relative;
width: 100%;
padding-bottom: 100%;
vertical-align: middle;
overflow: hidden; }
当我改变宽度时,它适用于Google Chrome和Firefox,但不适用于Internet Explorer。它保持还很小..
我试着使用width: auto;
或width: 100px;
但它不工作..
@ charl-steynberg感谢兄弟为您解答!很有用。但我没有告诉全面的信息。请参阅我在帖子中添加的其他信息 – chigher