老师,请检查代码
来源:3-4 编程练习
慕函数4436287
2019-03-28 16:29:56
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>元素的宽度</title>
<style type="text/css">
/*补充代码*/
div{background:pink; width:600px;}
.p1{width:50%;background:yellow;}
.p2{max-width:30%;background:yellow;}
.p3{min-width:70%;background:yellow;}
</style>
</head>
<body>
<div>
<p class="p1">第一个P标签是父元素宽度的50%</p>
<p class="p2">第二个P标签的最大宽度是父元素的30%</p>
<p class="p3">第三个P标签的最小宽度是父元素的70%</p>
</div>
</body>
</html>
1回答
Steve007
2019-03-28
同学,你好。效果实现的不错,代码也比较规范,加油,继续努力。
祝学习愉快!