style样式包(CSS)

* {
margin: 0;
padding: 0;
text-decoration: none;

}
body{
background-color: #f3f5f7;
height: 3000px;
}
.w {
width: 1200px;
margin: auto;
}
li {
list-style: none;
/* 清除全部li前面的小圆点 */
}

/* 清除浮动 */
.clearfix:before,.clearfix:after{
content: "";
display: table;

}
.clearfix:after{
clear: both;
}
.clearfix{
*zoom: 1;
}
.header {
height: 42px;
background-color:#f2f5f8;
/* 注意此地方会层叠w 里面的margin */
margin: 30px auto;
color: #ffffff;
}
.logo {
float: left;
width: 198px;
height: 42px;
background-color:purple;
}
/* 一个设置浮动,那么全部设置浮动 才起作用 */
/* 让导航栏在一个div显示 float即可 */
.nav {
float: left;
margin-left: 60px;

}
/* li是块级元素,所以在没有给li加浮动的时候 导航栏并没有到达预期的效果 */

.nav ul li {
float: left;
margin: 0 15px;
}
.nav ul li a{
display: block;
height: 42px;
line-height: 42px;
font-size: 18px;
padding: 0 10px;
/* a是行内元素 ,直接设置高度是无效的,所以要讲行内元素转换为块级元素 display: block; */
text-decoration: none;
color: #000;
}
.nav ul li a:hover{
border-bottom: 2px solid #00a4ff ;
color: #00a4ff;
}
/* search搜索模块 */
.search{
float: left;
margin-left: 50px;
width: 412px;
height: 42px;
background-color: skyblue;
}
.search input{
float: left;
width: 345px;
height: 40px;
border: 1px solid #00a4ff;
border-right: none;
color: #bfbfbf;
font-size: 14px;
padding-left: 15px;
}
.search button{
float: left;
width: 50px;
height: 42px;

/* 按钮button默认有个边款需要我们手动去掉 */
border: 0;
/* 行内块元素默认有一定的间隙 */
/* 所以可以给两个盒子加浮动 浮动元素没有间隙 */
background: url(sousuo.png);
}

.user{

float: right;
height: 42px;
line-height: 42px;

background-color: #f2f5f8;
}

/* banner区域 */
.banner {
height: 421px;
background-color: #1c036c;

}
.banner .w{
height: 421px;
background-color: skyblue;
background: url(php.png) no-repeat top center;
}
.subnav{
float: left;
width: 160px;
height: 421px;
padding: 0 20px;
background-color: rgba(0, 0, 0, 0.3);
}
.subnav ul li{
height: 45px;
line-height: 45px;
}
.subnav a{
font-size: 14px;
color: #fff;
text-decoration: none;
}
.subnav ul li a span{
float:right;
}
.subnav ul li a:hover{
color: #00a4ff;
}

.course
{
float:right;
width: 230px;
height: 300px;
background-color: #fff;


/* 浮动的盒子不会有外边距合并的问题 */
margin-top: 50px;
}
.course h2 {
height: 48px;
background-color: #9bceea;
text-align: center;
line-height: 48px;
font-size: 18px;
color: #fff;
}
.bd{
padding: 0 20px;
}
.bd ul li{
padding: 15px 0;
}
.bd ul li h4 {
font-size: 16px;
color: #4e4e4e;
}
.bd ul li p{
font-size: 12px;
color: #a5a5a5;
}
.bd .more{

display: block;
/* a为行内元素,没有大小,设置 高度无效 必须转换为块级元素*/
height: 38px;
border: 1px solid #00a4ff;
margin-top: 5px;
text-decoration: none;
text-align: center;
line-height: 38px;
color:#00a4ff;
font-size: 16px;
font-weight: 700;
}

.goods {
height: 60px;
background-color: #fff;
margin-top: 10px;
box-shadow: 0 2px 3px 3px rgba(0,0,0,0.1);
line-height: 60px;
}
.goods h3{
float: left;
margin-left: 30px;
font-size: 16px;
color: #00a4ff;
}
.goods ul{
float: left;
margin-left: 30px;

}
.goods ul li{
float: left;
}

.goods ul li a {
padding: 0 30px;
font-size: 16px;
color: #050505;
border-left: 1px solid #ccc;
}
.mod{
float: right;
margin-right: 30px;
font-size: 14px;
color: #00a4ff;
}
.box{
margin-top: 30px;
}

.box-hd{
height: 45px;
}
.box-hd h3{
float: left;
font-size: 20px;
color: #494949;
}
.box-hd a{
float: right;
font-size: 12px;
color: #a5a5a5;
margin-top: 10px;
margin-right: 30px;
}
.box-bd ul{
width: 1225px;
}


.box-bd ul li{
position: relative;
float: left;
width: 228px;
height: 270px;
background-color: #fff;
margin-right: 15px;
margin-bottom: 15px;
box-shadow: 0 2px 3px 3px rgba(0,0,0,0.1);
}

.box-bd ul li em{
position: absolute;
top: 0;
right: 0;

}
.box-bd ul li > img{
width: 100%;
}

.box-bd ul li h4{
margin: 20px 20px 20px 25px;
font-size: 14px;
color: #050505;
font-weight: 400;
}
.box-bd .info{
margin: 0 20px 0 25px;
font-size: 12px;
color: #999999;
}
.box-bd .info span{
color: #ff7c2d;
}
.footer{
height: 415px;
background-color: #FFF;
}
.footer .w{
padding-top: 35px;
}
.copyright{
float: left;
}
.copyright p{
font-size: 12px;
color: #666;
margin: 20px 0px 15px 0;
}
.copyright .app{
/* a属于行内元素,想要设置它的宽度必须转换为块级元素 */
display: block;
width: 118px;
height: 33px;
border: 1px solid #00a4ff;
text-align: center;
line-height: 33px;
color: #00a4ff;
font-size: 16px;
}
.links{
float: right;
}
.links dl {
float: left;
margin-left: 100px;
}
.links dl dt{
font-size: 16px;
color:#333;
margin-bottom: 5px;
}

.links dl dd a{
color: #333;
font-size: 12px;
}