float屬性
文章導(dǎo)讀:
<html>
<head>
<title>float屬性</title>
<style type="text/css">
<!--
body{
margin:15px;
font-family:Arial;
font-size:12px;
}
.father{
background-color:#fffea6;
border:1px solid #111111;
padding:25px; /* 父塊的padding */
}
.son1{
padding:10px; /* 子塊son1的padding */
margin:5px; /* 子塊son1的margin */
background-color:#70baff;
border:1px dashed #111111;
float:left; /* 塊son1左浮動 */
}
.son2{
padding:5px;
margin:0px;
background-color:#ffd270;
border:1px dashed #111111;
}
-->
</style>
</head>
<body>
<div class="father">
<div class="son1">float1</div>
<div class="son2">float2</div>
</div>
</body>
</html>