【问题标题】:Left and right space or padding with inline svg in internet explorer 9 to 11Internet Explorer 9 到 11 中的左右空格或内联 svg 填充
【发布时间】:2014-07-29 08:17:43
【问题描述】:

我有一个内联 SVG,并且 Internet Explorer 以某种方式在我的 svg 的左侧和右侧显示了某种边距、填充、边框或空间。

svg 覆盖了整个视口宽度。这意味着我有

<div class="head"> 

    <img src="head.svg">

</div>

这里是我的css:

.class img { position:absolute; top:0; width:100%; border:0; margin:0; padding:0 0 10% 0;} 

发生了什么事?这只发生在 Internet Explorer 中。

【问题讨论】:

    标签: html image css svg


    【解决方案1】:

    使用最大宽度,它会解决你的问题。确保还将高度设置为 100%

    【讨论】:

    • 不错,max-width 删除了左右填充。不幸的是在 IE11 中使用 height: 100%;将高度设置得太高。
    猜你喜欢
    • 1970-01-01
    • 2016-09-29
    • 1970-01-01
    • 2017-04-10
    • 2019-03-06
    • 1970-01-01
    • 2017-04-20
    • 2015-02-03
    • 1970-01-01
    相关资源
    最近更新 更多