图像在IE中被切断

时间:2013-10-23 14:03:11

标签: html css internet-explorer

我在IE中看到一些奇怪的东西,我希望看到的背景图片不会出现。

这是我的CSS:

#grey.internal #leader p{color: #525051;}
#grey h1 {color: #bc35b7;}
#grey.internal #for .forcont{ border:none;margin:0;}
#grey #leader p {font-size: 18px; line-height: 32px; width: 760px; margin: 0 auto; }
#grey #leader ul.section-links {padding: 32px 0 62px 0; width: 700px; margin: 155px auto 0 auto;height: 100%; border: 1px red solid; }
#grey #leader ul.section-links li {display: inline-block; margin: 0 6%;}
* html #grey #leader ul.section-links li { /* for IE6 */ display: inline;}
*+html #grey #leader ul.section-links li { /* for IE7 */ display: inline;}
#grey #leader ul.section-links li h2 a {color: #525051; text-decoration: none; height: 100%;  border: 1px blue solid;}
#grey #leader ul.section-links li h2 a:hover {text-decoration: underline;}
#grey #leader ul.section-links li h2 a.payments {background: url('/_/img/icon-payments.png') no-repeat 0 0; padding: 135px 30px 0 0; }
#grey #leader ul.section-links li h2 a.identity {background: url('/_/img/icon-identity.png') no-repeat 8px 0; padding: 135px 50px 0 60px; margin-right: 20px;}
#grey #leader ul.section-links li h2 a.analytics {background: url('/_/img/icon-analytics.png') no-repeat 10px 0; padding: 135px 0 0 0;}

这是html块:

<section id="leader">
    <p>Lorem</p>
    <ul class="section-links">
        <li class="p-item"><div class="icont"><h2><a href="/mobile-payments/" class="payments">Payments</a></h2></div></li>
        <li class="i-item"><div class="icont"><h2><a href="/identity/" class="identity">Identity</a></h2></div></li>
        <li class="a-item"><div class="icont"><h2><a href="/mobile-analytics/" class="analytics">Analytics</a></h2></div></li>
    </ul>
</section>

这就是我在IE(6-8)中看到的: IE screenshot

这就是我在Chrome中看到的内容:

Chrome screenshot

我添加了边框只是为了给我一个关于发生了什么的线索!

1 个答案:

答案 0 :(得分:2)

该问题与<section>标记有关。因为它是IE5,IE&lt; 9不支持,所以section标签不会包含任何内容(并且会自动关闭,从而使所有css无效)。将其更改为其他内容,或包含https://code.google.com/p/html5shiv/

相关问题