代码是否正确?
来源:2-14 编程练习
fatesses
2019-03-19 15:55:53
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.per{
width: 300px;
height: auto;
border:2px solid #aaa;
}
.li{
width: 100px;
height: 100px;
background: red;
margin: 5px;
float: left;
}
/*此处写代码*/
.clear{
clear:both;
}
</style>
</head>
<body>
<div class="per">
<div class="li"></div>
<div class="li"></div>
<!-- 此处写代码 -->
<div class="clear"></div>
</div>
</body>
</html>
1回答
好帮手慕星星
2019-03-19
你好,代码是正确的,效果没有问题。
祝学习愉快!
相似问题