3 回答

TA貢獻2012條經驗 獲得超12個贊
您可以使用jquery的每個函數:
var highest;
var first = 1;
$('.features').each(function() {
if(first == 1)
{
highest = $(this);
first = 0;
}
else
{
if(highest.height() < $(this).height())
{
highest = $(this);
}
}
});

TA貢獻1808條經驗 獲得超4個贊
您可以做三列div,但是您必須像這樣在其周圍添加包裝器
<div id="wrapper">
<div class="features"></div>
<div class="features"></div>
<div class="features"></div>
</div>
在頭標簽里放這個
<style type="text/css">
#wrapper {
position:relative;
overflow:hidden;
}
.features {
position:absolute;
float:left;
width:200px; /* set to whatever you want */
height:100%;
}
</style>
無論其中一個框的寬度是多少,其他框也將相同。希望這可以幫助。很抱歉,如果沒有,我只是當場編寫了代碼。
- 3 回答
- 0 關注
- 606 瀏覽
相關問題推薦
添加回答
舉報