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:5px;
background-color:#70baff;
border:1px dashed #111111;
}
.son2{
padding:5px; /* 子塊son2的padding */
margin:5px;
background-color:#ffd270;
border:1px dashed #111111;
float:right; /* 子塊son2向右浮動 */
}
-->
</style>
</head>
<body>
<div class="father">
<div class="son1">float1</div>
<div class="son2">float2</div>
</div>
</body>
</html>