我使用SVG徽标作为背景图像,我似乎无法在Internet Explorer (编辑:和Safari)中正确对齐左侧。svg背景图像的位置始终以Internet Explorer为中心,尽管背景位置:左中心;
容器看起来像这样:
<div id="header">
<div id="logo"></div>
</div>
随着风格:
#header{
width: 100%;
max-width: 1200px;
height: 100%;}
#logo{
background: url(../images/ss_logo.svg);
background-position: left center;
width: 100%;
height: 100%;
float: left;}
你可以看到<div>
应跨越其父的100%,但显示徽标的左侧元件。这在Chrome和Safari中运行良好,但徽标始终位于IE中<div id="logo">
的中间。
信息似乎很难找到这个,有没有其他人有同样的问题?这个是example version of the problem的链接,绿框是SVG。
什么版本的IE? – koningdavid
你能举一个这种行为的一个活生生的例子吗? –
在IE 10中得到这个问题,但也只是注意到它在Safari浏览器相同。 – bluefantail