在这里查看我的小提琴:http: //jsfiddle.net/nnHQp/1/
HTML:
<div class="box box1"><a href=#delete">Delete</a></div>
<div class="box box2"><a href=#delete">Delete</a></div>
<div class="box box3"><a href=#delete">Delete</a></div>
<div class="box box4"><a href=#delete">Delete</a></div>
CSS:
.box {
width: 150px;
height: 300px;
margin-right: 5px;
}
.box1 {
background-color: tomato;
float: left;
display: inline-block;
}
.box2 {
background-color: red;
float: left;
display: inline-block;
}
.box3 {
background-color: green;
float: left;
display: inline-block;
}
.box4 {
background-color: black;
float: left;
display: inline-block;
}
当其中一个框被删除时,剩下的应该滑动,下一个应该取代它。如何使用 JQuery 实现这一点?