abstrait:本章主要講CSS浮動(dòng)屬性:floatfloat:left向左浮動(dòng) right向右浮動(dòng)清除浮動(dòng):clear:left 清除左浮動(dòng) right清除右浮動(dòng) both左右都清除案例:<html><meta charset="utf-8"> <title>CSS浮動(dòng)</title><style type="text
本章主要講CSS浮動(dòng)屬性:float
float:left向左浮動(dòng) right向右浮動(dòng)
清除浮動(dòng):clear:left 清除左浮動(dòng) right清除右浮動(dòng) both左右都清除
案例:
<html>
<meta charset="utf-8">
<title>CSS浮動(dòng)</title>
<style type="text/css">
.meun{margin:20 auto;}
.meun ul li{list-dtyle:none; width:120; height:60px; border:sliod 1px #ccc; margin:0px 2px; float:left; }
.clear{clear:both;}
.boxs1{width:300px; height:200px; border:sliod 2px red; float:right;}
</style>
<body>
<div class="meun">
<ul>
<li>導(dǎo)航1</li>
<li>導(dǎo)航2</li>
<li>導(dǎo)航3</li>
<li>導(dǎo)航4</li>
<ul>
</div>
<div class="clear"></>
<div class="boxs1"></>
<div class="boxs1"></>
<div class="boxs1"></>
</body>
</html>
Professeur correcteur:西門大官人Temps de correction:2019-01-24 13:39:35
Résumé du professeur:作業(yè)完成的不錯(cuò),如果能把運(yùn)行效果圖上傳一下最好了。