重複或不..這裏是一個小提琴給你出個主意,你怎麼可以這樣
http://jsfiddle.net/pixelass/uAur5/
HTML
<span class="more">load more</span>
<div class="main">
<div class="left">this is a left box</div>
<div class="full">this is the right box</div>
</div>
CSS
.left {
background:#666;
margin:10px;
width:130px;
height:80px;
float:left;
padding:10px;
}
.full {
width:130px;
background:#eee;
float:right;
height:80px;
padding:10px;
margin:10px;
}
.main {
width:500px;
background:#000;
height:140px;
margin:20px 10px;
}
.more{
border:#000 1px solid;
padding:3px;
background:#222;
color:#aaa;
margin:20px;
cursor:pointer;
}
Ĵ查詢
$('.more').click(function(){
$('.main').append('<div class="left">this is a left box</div>');
$('.full').css('height', '+=120px');
$('.main').css('height', '+=120px');
});
有很多種方法可以做到這一點,問題是大約與css一樣古老。看看http://stackoverflow.com/search?q=equal+height+column的一些回報。 – ScottS 2011-12-19 01:22:12