<div class='box1'>
</div>
<div class='box2'>
</div>
<div class='box3'>
</div>
<div class='box4'>
</div>
<script>
//用jQuery实现这种功能
$('.box').background='red';
$('.box').background='black'
$('.box').background='pink'
$('.box').background='yello'
</script>