js中的浮动演示

xiaoxiao2021-02-28  119

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>浮动 float </title> <style type="text/css"> *{margin:0;padding:0;} #wrap{width:700px;height:600px;} #div1{background:red;width:200px;height:200px;float:left;} #div2{background:blue;width:300px;float: left;height:300px;} #div3{background:green;width:400px;height:400px;clear:both;} </style> </head> <body> <div id="wrap"> <div id="div1"></div> <div id="div2"></div> <div id="div3"></div> </div>

</body>

具体结果如图所示

</html>
转载请注明原文地址: https://www.6miu.com/read-26249.html

最新回复(0)