我有一個div,column-count
設置爲3
。裏面是一些ul
s。我看到右側第4列的開始 - 爲什麼當我指定3列時會出現?CSS列顯示不正確
HTML(小提琴這裏:http://jsfiddle.net/B6zDR/3/)
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
div
{
height: 150px;
width: 835px;
padding: 20px;
overflow: hidden;
text-overflow: ellipsis;
-moz-column-count: 3;
-webkit-column-count: 3;
column-count: 3;
background-color: lightblue;
}
h2
{
margin: 0;
}
</style>
</head>
<body>
<div>
<h2>UL #1</h2>
<ul>
<li>1</li>
<li>2</li>
</ul>
<h2>UL #2</h2>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
</ul>
<h2>UL #3</h2>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
<h2>UL #4</h2>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
<h2>UL #5</h2>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
</body>
</html>
我覺得你的提琴有錯了地方長官的HTML! – thatidiotguy
哎呀,粘貼到錯誤版本的鏈接! http://jsfiddle.net/B6zDR/3/ –
什麼瀏覽器,你看到這下? –