目录
1.代码
style.css
* {
margin: 0;
padding: 0;
}
body {
background-image: url("../images/bg.gif");
}
/*头部*/
.header {
width: 100%;
height: 70px;
background-color: #1B1C1D;
position: fixed;
}
.header > .nav {
width: 85%;
margin: 0 auto;
height: 100%;
}
/*标题*/
.header > .nav > .title {
height: 100%;
line-height: 70px;
float: left;
width: 25%;
color: #00B5AD;
font-size: 30px;
font-weight: bold;
}
/*标签*/
.header > .nav > .label {
float: left;
height: 100%;
width: 45%;
}
.header > .nav > .label > ul {
list-style-type: none;
color: #ABABAC;
}
.header > .nav > .label > ul > li {
float: left;
height: 36px;
line-height: 36px;
text-align: center;
font-size: 18px;
font-weight: bold;
margin: 17px 15px 0 0;
padding: 0 15px;
border-radius: 10px;
}
.header > .nav > .label > ul > li:hover {
background-color: #2D2E2F;
color: #FFFFFF;
}
.header > .nav > .label > ul > .checked {
background-color: #3D3E3F;
color: #FFFFFF;
}
/*搜索*/
.header > .nav > .search {
height: 100%;
width: 30%;
float: left;
cursor: pointer;
position: relative;
}
.header > .nav > .search input {
height: 36px;
width: 70%;
border-radius: 4px;
border-width: 0;
padding-left: 10px;
outline: none;
position: absolute;
right: 0;
top: 14px;
}
.header > .nav > .search img {
height: 24px;
position: absolute;
right: 7px;
top: 20px;
}
/*中间*/
.main {
width: 85%;
margin: 0 auto;
padding-top: 130px;
}
/*左边*/
.main > .left {
width: 23%;
float: left;
}
/*左边小窗口*/
.main > .left > .aside-box {
width: 100%;
background-color: #FFFFFF;
margin-bottom: 10px;
}
.main > .left > .aside-box > .title {
width: 100%;
height: 38px;
color: #3D3D3D;
line-height: 38px;
padding: 0 16px;
font-weight: bold;
}
.main > .left > .aside-box > .hr {
width: 100%;
height: 1px;
background-color: #DCDFE6;
}
.main > .left > .aside-box > .content {
width: 100%;
padding: 8px 16px 16px 16px;
}
/*最新文章*/
.main > .left > .aside-box > .content > ul {
width: 100%;
color: #333333;
list-style: none;
cursor: pointer;
}
.main > .left > .aside-box > .content > ul > li {
margin-top: 8px;
}
.main > .left > .aside-box > .content > ul > li:hover {
color: #CF3016;
}
/*分类专栏*/
.main > .left > .aside-box > .class-content {
padding-bottom: 16px;
padding-top: 8px;
}
.main > .left > .aside-box > .class-content > .class {
height: 20px;
line-height: 20px;
width: 100%;
margin-top: 8px;
cursor: pointer;
}
.main > .left > .aside-box > .class-content > .class > .name {
float: left;
padding: 0 16px;
color: #333333;
}
.main > .left > .aside-box > .class-content > .class > .name:hover {
float: left;
padding: 0 16px;
color: #CF3016;
}
.main > .left > .aside-box > .class-content > .class > .number {
float: right;
padding: 0 16px;
font-size: 12px;
color: #858585;
height: 20px;
line-height: 20px;
}
/*热门文章*/
.main > .left > .aside-box > .content > ul > li > .hot {
height: 20px;
line-height: 20px;
color: #333333;
}
.main > .left > .aside-box > .content > ul > li > .hot:hover {
color: #CF3016;
}
.main > .left > .aside-box > .content > ul > li > .red-number {
height: 12px;
line-height: 12px;
font-size: 12px;
color: #858585;
margin-top: 3px;
}
/*联系博主*/
.main > .left > .aside-box > .img-content > img {
width: 90%;
margin: 16px 5%;
}
/*右边*/
.main > .right {
width: 76%;
float: right;
background-color: #FFFFFF;
}
/*筛选排序*/
.main > .right > .filter-soft-box {
width: 100%;
height: 47px;
border-bottom: 1px solid #000000;
font-size: 16px;
}
/*筛选*/
.main > .right > .filter-soft-box > .filter {
height: 100%;
line-height: 47px;
width: 30%;
float: left;
margin-left: 24px;
}
.main > .right > .filter-soft-box > .filter:hover {
color: #CF3016;
}
.main > .right > .filter-soft-box > .filter input {
height: 18px;
width: 18px;
cursor: pointer;
vertical-align: middle;
}
.main > .right > .filter-soft-box > .filter label {
cursor: pointer;
}
/*排序*/
.main > .right > .filter-soft-box > .soft {
height: 100%;
line-height: 47px;
width: 60%;
float: right;
}
.main > .right > .filter-soft-box > .soft > span {
float: right;
margin-right: 36px;
}
.main > .right > .filter-soft-box > .soft > .soft:hover {
color: #CF3016;
cursor: pointer;
}
.main > .right > .filter-soft-box > .soft > .name {
color: #858585;
}
.color-red {
color: #CF3016;
}
/*文章*/
.main > .right > .article {
width: 100%;
height: 112px;
cursor: pointer;
border-bottom: 1px solid #000000;
padding-top: 10px;
}
.main > .right > .article:hover {
background-color: #F5F5F5;
}
/*标题*/
.main > .right > .article > .title {
padding: 0 20px;
font-size: 18px;
font-weight: bold;
color: #3D3D3D;
}
.main > .right > .article > .title:hover {
color: #CF3016;
}
/*内容*/
.main > .right > .article > .content {
height: 39px;
overflow: hidden;
font-size: 14px;
color: #6B6B6B;
margin-top: 8px;
padding: 0 20px;
}
/*文章底部*/
.main > .right > .article > .bottom {
padding: 0 20px;
margin-top: 8px;
font-size: 13px;
color: #6B6B6B;
}
.main > .right > .article > .bottom .num {
color: #3399EA;
margin-left: 3px;
}
.main > .right > .article > .bottom .point {
margin: 0 8px;
}
/*分页*/
.main > .right > .page {
width: 100%;
height: 70px;
position: relative;
}
.main > .right > .page > ul {