Correcting teacher:天蓬老师
Correction status:qualified
Teacher's comments:grid布局是table布局的plus+, 以后肯定会成一种趋势, 越早接触越好
由于春节和疫情原因,现开始补交作业,争取尽快赶上进度
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="../static/font/iconfont.css">
<title>public_comment_reply</title>
<style>
.public_comment_reply{
padding: 20px;
box-sizing: border-box;
background-color: #fff;
display: grid;
}
.public_comment_reply>.comment{
display: grid;
grid-template-rows: 50px 250px 50px ;
}
.public_comment_reply>.comment img{
width: 60px;
height: 60px;
border-radius: 5px;
box-shadow: 1px 1px 3px #cccccc;
}
.public_comment_reply>.comment>h3{
padding: 10px 0;
border-top: 1px solid #cccccc;
}
.public_comment_reply>.comment >div{
padding: 15px;
height: 200px;
display: grid;
}
.public_comment_reply>.comment >div img{
/*align-self: center;*/
}
.public_comment_reply>.comment >.comment_area{
display: grid;
grid-template-areas: "a b";
grid-auto-columns:60px 1fr;
grid-auto-flow:row;
}
.public_comment_reply>.comment>.comment_area>div textarea{
height: 200px;
margin-left: 10px;
resize: none;
width: 100%;
}
.public_comment_reply>.comment>div textarea:hover{
box-shadow: 0 0 8px #888888;
}
.public_comment_reply>.comment>button{
width: 150px;
height: 40px;
font-size: 14px;
background-color: #f64c59;
border: none;
color: white;
justify-self: end;
}
.public_comment_reply>.comment>button:hover{
background-color: #178cee;
box-shadow: 0 0 8px #888888;
cursor: pointer;
}
.public_comment_reply>.reply{
display: grid;
padding: 15px;
grid-template-rows: 50px repeat(4,1fr) ;
}
.public_comment_reply>.reply > div{
display: grid;
margin-top: 30px;
}
.public_comment_reply>.reply > .reply_area{
display: grid;
grid-template-columns: 50px 2fr 1fr;
}
.public_comment_reply>.reply > div >img{
}
.public_comment_reply>.reply > div >.detail{
display: grid;
margin-left: 20px;
height: 90px;
}
.public_comment_reply>.reply > .reply_area> div:last-of-type{
justify-self: end;
align-self: end;
}
.public_comment_reply>.reply > .reply_area > div i{
color: red;
font-size: 1.2rem;
margin-right: 5px;
}
</style>
</head>
<body>
<div class="public_comment_reply">
<!-- 评论-->
<div class="comment">
<h3>我要评论</h3>
<div class="comment_area">
<div><label for="comment">
<img src="../static/images/user.png" alt="">
</label></div>
<div>
<textarea name="" id="comment"></textarea>
</div>
</div>
<button>发表评论</button>
</div>
<!-- 回复-->
<div class="reply">
<h3>最新回复</h3>
<div class="reply_area">
<img src="../static/images/user.png" width="60" alt="">
<div class="detail">
<span>用户昵称</span>
<span>留言内容:Php.cn</span>
<span>2019-12-12 15:53:45发表</span>
</div>
<div>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
<div class="reply_area">
<img src="../static/images/user.png" width="60" alt="">
<div class="detail">
<span>用户昵称</span>
<span>留言内容:Php.cn</span>
<span>2019-12-12 15:53:45发表</span>
</div>
<div>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
<div class="reply_area">
<img src="../static/images/user.png" width="60" alt="">
<div class="detail">
<span>用户昵称</span>
<span>留言内容:Php.cn</span>
<span>2019-12-12 15:53:45发表</span>
</div>
<div>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
<div class="reply_area">
<img src="../static/images/user.png" width="60" alt="">
<div class="detail">
<span>用户昵称</span>
<span>留言内容:Php.cn</span>
<span>2019-12-12 15:53:45发表</span>
</div>
<div>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
</div>
</div>
</body>
</html>
将Flex布局变更为Grid布局时,对Flex布局对于网页放大缩小时比例不变化,网页不变形的优势有了进一步的认识,同时对Grid布局有了初步认识