1.导航条
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>导航条</title>
<style type="text/css">
/*清除默认样式*/
*{
margin: 0;
padding: 0;
}
/*设置ul*/
.nav{
/*去除项目符号*/
list-style: none;
/*为ul设置一个背景颜色*/
background-color: #6495ed;
/*设置一个宽度*/
/*在IE6中,如果为元素指定了一个宽度,则会默认开启hasLayout*/
width: 1000px;
/*设置居中*/
margin: 50px auto;
/*解决高度塌陷*/
overflow: hidden;
}
/*设置li*/
.nav li{
/*设置li向左浮动*/
float: left;
width: 12.5%;
}
.nav a{
/*将a转换为块元素*/
display: block;
/*为a指定一个宽度*/
width: 100%;
/*设置文字居中*/
text-align: center;
/*设置一个上下内边距*/
padding: 5px 0;
/*去除下划线*/
text-decoration: none;
/*设置字体颜色*/
color: white;
/*设置加粗*/
font-weight: bold;
}
/*设置a的鼠标移入的效果*/
.nav a:hover{
background-color: #cc0000;
}
</style>
</head>
<body>
<!-- 创建导航条的结构 -->
<ul class="nav">
<li><a href="#">首页</a></li>
<li><a href="#">新闻</a></li>
<li><a href="#">联系</a></li>
<li><a href="#">关于</a></li>
<li><a href="#">首页</a></li>
<li><a href="#">新闻</a></li>
<li><a href="#">联系</a></li>
<li><a href="#">关于</a></li>
</ul>
</body>
</html>
导航条
2.开班信息
<!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: 300px;
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;
}
.title 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: 14px;
margin-bottom: 16px;
}
.content .right{
float: right;
}
.content ul{
list-style: none;
border-bottom: 1px dashed #deddd9;
}
.content .no-border{
border: none;
}
.content .redfont{
color: red;
font-weight: bold;
}
.content li{
margin-bottom: 15px;
}
</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 class="right" href="#"><span class="redfont">预约报名</span></a>
<a href="#">开班时间:<span class="redfont">2018-04-26</span></a>
</li>
<li>
<a class="right" href="#"><span class="redfont">无座,名额爆满</span></a>
<a href="#">开班时间:<span class="redfont">2018-03-23</span></a>
</li>
<li>
<a class="right" href="#"><span>开班盛况</span></a>
<a href="#">开班时间:<span>2018-01-23</span></a>
</li>
<li>
<a class="right" href="#"><span>开班盛况</span></a>
<a href="#">开班时间:<span>2017-12-20</span></a>
</li>
<li>
<a class="right" href="#"><span>开班盛况</span></a>
<a href="#">开班时间:<span>2017-11-18</span></a>
</li>
</ul>
<h3><a href="#">Android开发+测试-高薪就业班</a></h3>
<ul>
<li>
<a class="right" href="#"><span class="redfont">预约报名</span></a>
<a href="#">开班时间:<span class="redfont">2018-04-26</span></a>
</li>
<li>
<a class="right" href="#"><span>开班盛况</span></a>
<a href="#">开班时间:<span>2018-03-23</span></a>
</li>
<li>
<a class="right" href="#"><span>开班盛况</span></a>
<a href="#">开班时间:<span>2018-01-23</span></a>
</li>
<li>
<a class="right" href="#"><span>开班盛况</span></a>
<a href="#">开班时间:<span>2017-12-20</span></a>
</li>
</ul>
<h3><a href="#">大数据软件开发-青芒工作室</a></h3>
<ul class="no-border">
<li>
<a class="right" href="#"><span class="redfont">预约报名</span></a>
<a href="#">开班时间:<span class="redfont">2018-04-26</span></a>
</li>
<li>
<a class="right" href="#"><span>开班盛况</span></a>
<a href="#">开班时间:<span>2018-01-23</span></a>
</li>
</ul>
</div>
</div>
</body>
</html>
开班信息