我想在顯示內嵌塊的頁面上顯示多個DIV。除了最後一行以某些瀏覽器寬度顯示不正確的間距之外,這種方法非常有效。這是最好的寬屏顯示器。multiple in-line對齊。在最後一行divs顯示不正確
有誰知道我該如何解決這個問題?
感謝您的任何幫助。
<style type="text/css">
.item {
Margin: 0 5px;
margin-bottom:30px;
width:160px;
height:240px;
display:inline-block !important;
}
#container {
width: -moz-calc(100% - 80px);
width: -webkit-calc(100% - 80px);
width: calc(100% - 80px);
text-align: justify !important;
-ms-text-justify: distribute-all-lines;
text-justify: distribute-all-lines;
margin:50px;
}
</style>
<div id=container>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
</div>
可你的jsfiddle的你問題 –
爲他創建[JSFiddle](http://jsfiddle.net/fuzzball007/VqLY7/)。 'justify'標籤正在這樣做,我假設,因爲證明文本通常不會像其他行一樣延伸最後一行。 –