第一部分div盒子,依次往后是列表内填写文字,给某些超链接设置鼠标经过(hover)的效果,文字设置行高实现垂直居中,包括“text-decoration”设置为“none”去除链接默认下划线。列表默认的项目符号需要用“list-style:none”去除。再有就是边框线,下边框线的话,顾名思义就是“border-bottom”,给它设置线框的格式、颜色、宽度;如果要实现圆角边框就要用“border-radius”,直接设置一个数值,单位是“px”。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>开班信息</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
body{
font: 12px/1 宋体;
}
.outer{
width: 360px;
margin: 50px auto;
}
.title{
border-top: 2px #019e8b solid;
height: 36px;
background-color: #f5f5f5;
line-height: 36px;
padding: 0px 22px 0px 16px;
}
.title a{
float: right;
color: red;
}
.titlr h3{
font: 16px/36px '微软雅黑';
}
.content{
border: 1px solid #deddd9;
padding: 0px 28px 0px 20px
}
.content a{
color: black;
text-decoration: none;
font-size: 12px;
}
.content a:hover{
color: red;
text-decoration: underline;
}
.content h3{
margin-top: 15px;
margin-bottom: 15px
}
.content ul{
list-style: none;
border-bottom: 1px dashed #deddd9;
}
.content li{
margin-bottom: 15px;
}
.content .red-font{
color: red;
font-weight: bold;
}
.content .right{
float: right;
}
.content .no-boeder{
border: none;
}
</style>
</head>
<body>
<div class="outer">
<div class="title">
<a href="#">18年面授开班计划</a>
<h3>近期开班</h3>
</div>
<div class="content">
<h3><a href="#">人工智能+Python-高新就业班</a></h3>
<ul>
<li>
<a href="#">开班时间:<span class="red-font">2018-04-26</span></a>
<a class="right" href="#"><span class="red-font">预约报名</span></a>
</li>
<li>
<a href="#">开班时间:<span class="red-font">2018-03-23</span></a>
<a class="right" href="#"><span class="red-font">无座,名额爆满</span></a>
</li>
<li>
<a href="#">开班时间:<span>2018-01-23</span></a>
<a class="right" href="#"><span>开班盛况</span></a>
</li>
<li>
<a href="#">开班时间:<span>2017-12-20</span></a>
<a class="right" href="#"><span>开班盛况</span></a>
</li>
<li>
<a href="#">开班时间:<span>2017-11-18</span></a>
<a class="right" href="#"><span>开班盛况</span></a>
</li>
</ul>
<h3><a href="#">Android开发+测试-高薪就业班</a></h3>
<ul>
<li>
<a href="#">开班时间:<span class="red-font">2018-04-26</span></a>
<a class="right" href="#"><span class="red-font">预约报名</span></a>
</li>
<li>
<a href="#">开班时间:<span class="red-font">2018-03-23</span></a>
<a class="right" href="#"><span class="red-font">无座,名额爆满</span></a>
</li>
<li>
<a href="#">开班时间:<span>2018-01-23</span></a>
<a class="right" href="#"><span>开班盛况</span></a>
</li>
<li>
<a href="#">开班时间:<span>2017-12-20</span></a>
<a class="right" href="#"><span>开班盛况</span></a>
</li>
</ul>
<h3><a href="#">大数据软件开发-青芒工作室</a></h3>
<ul class="no-border">
<li>
<a href="#">开班时间:<span class="red-font">2018-04-26</span></a>
<a class="right" href="#"><span class="red-font">预约报名</span></a>
</li>
<li>
<a href="#">开班时间:<span class="red-font">2018-01-23</span></a>
<a class="right" href="#"><span class="red-font">开班盛况</span></a>
</li>
</ul>
</div>
</div>
</body>
</html>
11875446-2032a945e10988a5.png