2-6 烦请老师检查,谢谢
来源:2-5 编程练习
Miki未希
2020-05-24 14:00:43
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>float</title>
<style>
.div1{
width: 100px;
height: 100px;
background: red;
float:left;
/*此处写代码*/
}
.div2{
width: 300px;
height: 300px;
background: blue;
float:right;
/*此处写代码*/
}
.div3{
width: 100px;
height: 100px;
background: green;
/*此处写代码*/
float:inherit; /*该属性继承继承伟为使得DIV3继承父元素的浮动属性*/
}
</style>
</head>
<body>
<div class="div1"></div>
<div class="div2">
<div class="div3"></div>
</div>
</body>
</html>1回答
同学你好,代码实现的没问题,继续加油,祝学习愉快!
相似问题