abstrakt:本章主要講CSS浮動屬性:floatfloat:left向左浮動 right向右浮動清除浮動:clear:left 清除左浮動 right清除右浮動 both左右都清除案例:<html><meta charset="utf-8"> <title>CSS浮動</title><style type="text
本章主要講CSS浮動屬性:float
float:left向左浮動 right向右浮動
清除浮動:clear:left 清除左浮動 right清除右浮動 both左右都清除
案例:
<html>
<meta charset="utf-8">
<title>CSS浮動</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>
Korrigierender Lehrer:西門大官人Korrekturzeit:2019-01-24 13:39:35
Zusammenfassung des Lehrers:作業(yè)完成的不錯,如果能把運(yùn)行效果圖上傳一下最好了。