jsfiddle:http: //jsfiddle.net/PTSkR/195/
我试图让小蓝色潜水员始终坐在角落里,在红色下方但在大蓝色潜水员的右侧。如何做到这一点?
CSS:
.floated{
background-color: blue;
color: white;
padding: 5px;
float: left;
display: block;
}
.big{
height: 300px;
}
.with-padding{
padding: 50px;
}
.yellow{
background-color: red;
}
HTML:
<div class='floated big'>FLOATED BIG</div>
<div class='floated with-padding yellow'>SHOULD BE NEXT TO FLOATED BIG</div>
<div class='floated'>push down</div>