0
我創建了一個浮動圖像網格,其中圖像設置爲100%,並且它們之間有1px邊框。這個問題似乎只發生在IE9中......如果你慢慢調整瀏覽器的大小,你會到達水平邊框消失的地步。這裏的測試:http://zerostatic.com/float_grid/帶1px邊框的浮動網格 - 在某些瀏覽器寬度的IE9中,水平邊框消失
CSS:
*{
margin: 0;
padding: 0;
border: 0;
}
ul{
width:100%;
}
li{
list-style:none;
float:left;
width:33.333333333%;
}
.li-inner{
border:1px solid red;
margin-left: -1px;
margin-top: -1px;
}
img{
width:100%;
}
HTML:
<ul>
<li>
<div class="li-inner">
<a href="#" class="full-image"><img src="http://www.zerostatic.com/01.jpg" alt=""></a>
</div>
</li>
<li>
<div class="li-inner">
<a href="#" class="full-image"><img src="http://www.zerostatic.com/01.jpg" alt=""></a>
</div>
</li>
<li>
<div class="li-inner">
<a href="#" class="full-image"><img src="http://www.zerostatic.com/01.jpg" alt=""></a>
</div>
</li>
<li>
<div class="li-inner">
<a href="#" class="full-image"><img src="http://www.zerostatic.com/01.jpg" alt=""></a>
</div>
</li>
<li>
<div class="li-inner">
<a href="#" class="full-image"><img src="http://www.zerostatic.com/01.jpg" alt=""></a>
</div>
</li>
<li>
<div class="li-inner">
<a href="#" class="full-image"><img src="http://www.zerostatic.com/01.jpg" alt=""></a>
</div>
</li>
<li>
<div class="li-inner">
<a href="#" class="full-image"><img src="http://www.zerostatic.com/01.jpg" alt=""></a>
</div>
</li>
<li>
<div class="li-inner">
<a href="#" class="full-image"><img src="http://www.zerostatic.com/01.jpg" alt=""></a>
</div>
</li>
<li>
<div class="li-inner">
<a href="#" class="full-image"><img src="http://www.zerostatic.com/01.jpg" alt=""></a>
</div>
</li>
</ul>
感謝詳細介紹了非常有用的箱上漿技術建議魁梧,我已經添加strppd和CSS:* {-moz-箱大小:邊界框; -webkit-box-sizing:border-box;盒子尺寸:邊框; }但IE9仍然沒有運氣。還嘗試了normalize.css。我更新了鏈接:http://zerostatic.com/float_grid/ – zerostatic 2013-04-07 22:34:32