作品:
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>案列练习</title>
<style type="text/css">
body,div,p,h1{
margin: 0px;
padding: 0px;
}
.coures{
margin:0 auto;
height: 500px;
width: 300px;
}
span{
font-size: 32px;
font-weight: bold;
}
.one{
width: 100%;
height:200px;
background-color: black;
text-align: center;
line-height:200px;
color: #fff;
}
.two{
width: 100%;
height: 100px;
background: rgb(233, 230, 230);
}
h1,p{
margin: 0 10%;
}
h1{
font-size: 16px;
padding: 5% 0;
}
p{
border-bottom:2px solid grey;
padding-bottom: 5%;
}
.special p{
border-bottom: none;
}
</style>
</head>
<body>
<div class="coures">
<div class="one"><span>前端课程排列</span></div>
<div class="two">
<h1>HTML+CSS基础课程</h1>
<p>456605人在学</p>
</div>
<div class="two">
<h1>HTML+CSS基础课程</h1>
<p>456605人在学</p>
</div>
<div class="two special ">
<h1>HTML+CSS基础课程</h1>
<p>456605人在学</p>
</div>
</div>
</body>
</html>