html如何编写边长由5个*围成的正方形
发布网友
发布时间:2023-11-05 00:16
我来回答
共2个回答
热心网友
时间:2024-07-19 08:07
HTML?那不是只有直接布局嘛,打上去,空格加*堆起来
热心网友
时间:2024-07-19 08:06
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
#out_div{
height:300px;
width:300px;
border:1px solid blue;
}
.divall{
float:left;
text-align:center;
}
#div1,#div4{
width:100px;
height:200px;
background:#FF3;
}
#div2,#div5{
width:200px;
height:100px;
background:#F90;
}
#div3{
width:100px;
height:100px;
background:red;
}
</style>
</head>
<body>
<div id="out_div">
<div id="div1" class="divall">1</div>
<div id="div2" class="divall">2</div>
<div id="div3" class="divall">3</div>
<div id="div4" class="divall">4</div>
<div id="div5" class="divall">5</div>
</div>
</body>
</html>