1、头部导航栏
![](https://img-blog.csdnimg.cn/18224d5edea54df3bf215a208282e397.png)
/* #region顶部导航条开始 */
.topbar {
height: 30px;
background-color: #ECECEC;
}
.welcome {
height: 30px;
line-height: 30px;
font-size: 0;
color: #666;
}
.welcome span,.welcome a {
font-size: 12px;
}
.welcome .hello{
margin-right: 28px;
}
.welcome .login {
padding-right: 10px;
border-right: 1px solid #666;
}
.welcome .register {
padding-left: 10px;
}
.topbar .list {
height: 30px;
line-height: 30px;
}
.topbar .list li {
float: left;
}
.topbar .list li a {
padding: 0 15px;
border-right: 1px solid #666;
}
.topbar .list li:first-child a {
padding-left: 0;
}
.topbar .list li:last-child a {
padding-right: 0;
border: 0;
}
/* #endregion顶部导航条结束 */
/* #region头部start */
.header {
height: 120px;
/* background-color: skyblue; */
}
.header .search form {
margin-top: 42px;
font-size: 0;
}
.header .search input {
/* 给了边框width和height都要减少2px */
width: 508px;
height: 34px;
border: 1px solid #DD302D;
}
.header .search button {
width: 80px;
height: 36px;
background-color: #DD302D;
vertical-align: top;
background-image: url(../images/serch_icon.png);
background-repeat: no-repeat;
background-position: 28px 6px;
}
/* #endregion头部end */
2、主体部分
![](https://img-blog.csdnimg.cn/897e9e25b2be45a4a11afa47d7a28733.png)
/* #region主导航start */
.main-nav {
height: 48px;
border-bottom: 1px solid #DD302D;
}
.main-nav .all-types {
width: 190px;
height: 48px;
line-height: 48px;
background-color: #DD302D;
color: white;
text-align: center;
font-size: 16px;
}
.main-nav-list {
height: 48px;
line-height: 48px;
}
.main-nav-list li {
float: left;
margin: 0 10px;
font-size: 16px;
}
/* #endregion主导航end */
/* #region头部start */
.main-content {
margin-top: 10px;
}
.main-content .slide-nav {
width: 190px;
height: 458px;
background-color: #F4F4F4;
position: relative;
}
.main-content .slide-nav li {
font-size: 14px;
height: 28px;
line-height: 28px;
padding-left: 16px;
}
.main-content .slide-nav li:hover {
background-color: #DD302D;
}
.main-content .slide-nav li:hover>a {
color: #fff;
}
.second-menu {
width: 680px;
height: 458px;
background-color:white;
position: absolute;
top: 0;
left: 190px;
padding-left: 20px;
display: none;
}
.main-content .slide-nav li:hover .second-menu {
display: block;
}
.second-menu dl {
height: 36px;
line-height: 36px;
}
.second-menu dt{
width: 70px;
float: left;
font-weight: bold;
margin-right: 10px;
}
.second-menu dl:first-child {
margin-top: 10px;
}
.second-menu dd {
float: left;
}
.second-menu dd a {
padding: 0 10px;
border-left: 1px solid #666;
}
.main-content .banner {
width: 690px;
height: 458px;
background-color: green;
margin: 0 10px;
}
.main-content .slide-other {
width: 290px;
height: 458px;
/* background-color: orange; */
}
.main-content .message {
width: 260px;
height: 156px;
border: 1px solid #D9D9D9 ;
padding: 0 14px;
}
.main-content .message .title {
height: 38px;
line-height: 38px;
border-bottom: 1px solid #D9D9D9;
}
.main-content .message .title span {
font-size: 14px;
}
.main-content .message .title a {
font-size: 12px;
}
.slide-other .msg-list li {
height: 26px;
line-height: 26px;
}
.slide-other .other-nav {
margin-top: 10px;
width: 290px;
height: 290px;
/* background-color: yellow; */
overflow: hidden;
}
.other-nav li {
width: 48px;
height: 70px;
/* background-color: turquoise; */
float: left;
margin: 0 11px;
text-align: center;
cursor: pointer;
}
.other-nav .other-nav-list:first-child {
margin-top: 16px;
}
.other-nav .other-nav-list:nth-child(2) {
margin: 17px 0;
}
.other-nav li:first-child {
margin-left: 16px;
}
.other-nav-list .picture {
width: 48px;
height: 48px;
background-image: url(../images/精灵图-侧边功能.png);
}
.other-nav-list:nth-child(1) li:nth-child(1) .picture {
background-position: 0 0;
}
.other-nav-list:nth-child(1) li:nth-child(2) .picture{
background-position: -48px 0;
}
.other-nav-list:nth-child(1) li:nth-child(3) .picture{
background-position: -96px 0;
}
.other-nav-list:nth-child(1) li:nth-child(2) .picture{
background-position: -144px 0;
}
.other-nav-list:nth-child(2) li:nth-child(1) .picture {
background-position: 0 -48px;
}
.other-nav-list:nth-child(2) li:nth-child(2) .picture {
background-position: -48px -48px;
}
.other-nav-list:nth-child(2) li:nth-child(3) .picture {
background-position: -96px -48px;
}
.other-nav-list:nth-child(2) li:nth-child(4) .picture {
background-position: -144px -48px;
}
.other-nav-list:nth-child(3) li:nth-child(1) .picture {
background-position: 0 -96px;
}
.other-nav-list:nth-child(3) li:nth-child(2) .picture {
background-position: -48px -96px;
}
.other-nav-list:nth-child(3) li:nth-child(3) .picture {
background-position: -96px -96px;
}
.other-nav-list:nth-child(3) li:nth-child(4) .picture {
background-position: -144px -96px;
}
/* #endregion头部end*/
3、秒杀区域
![](https://img-blog.csdnimg.cn/6fd441e1c8914bc6b4363e307177d8e9.png)
/* #region秒杀区start*/
.seckill {
margin-top: 10px;
}
.seckill img {
float: left;
margin-right: 11px;
cursor: pointer;
}
.seckill img:last-child {
margin-right: 0;
}
/* #endregion秒杀区end*/
4、家用电器
/* #region楼层区start*/
.floor {
margin-top: 48px;
}
.floor-name {
font-size: 20px;
}
.floor-nav {
height: 30px;
line-height: 30px;
padding-bottom: 4px;
border-bottom: 2px solid #DD302D;
}
.floor-nav-list li {
float: left;
font-size: 14px;
}
.floor-nav-list li a {
padding: 0 10px;
border-right: 1px solid #666;
}
.floor-nav-list li:first-child a {
padding-left: 0;
}
.floor-nav-list li:last-child a {
padding-right: 0;
border: 0;
}
.floor-info .item {
float: left;
}
.floor-info .item1 {
width: 190px;
height: 392px;
background-color: #F4F4F4 ;
padding: 20px;
}
.item1-list {
margin-bottom: 29px;
}
.item1-list li {
width: 90px;
height: 22px;
padding-bottom: 3.5px;
border-bottom: 1px solid #D9D9D9 ;
font-size: 16px;
text-align: center;
}
.item1-list li:nth-child(2n-1) {
float: left;
}
.item1-list li:nth-child(2n) {
float: right;
}
.item1-list li:nth-child(3),
.item1-list li:nth-child(4) {
margin: 14.4px 0;
}
.floor-info .item2 {
width: 340px;
height: 432px;
}
.floor-info .item3,
.floor-info .item4,
.floor-info .item5 {
width: 206px;
height: 432px;
}
.floor-info .item3 img,
.floor-info .item4 img,
.floor-info .item5 img {
border-bottom: 1px solid #E2E2E2 ;
}
.floor-info .item3,
.floor-info .item4 {
border-right: 1px solid #E2E2E2 ;
}
/* #endregion楼层区end*/
5、底部区域
![](https://img-blog.csdnimg.cn/6444b22076bc4498af8aa4cf8ece7b7d.png)
/* #region页脚区start */
.footer {
margin-top: 48px;
height: 440px;
background-color: #483E3E ;
}
.links-list {
float: left;
width: 190px;
height: 176px;
margin-top: 48px;
margin-right: 10px;
}
.links-list:last-child {
margin-right: 0px;
}
.links-list a {
color: white;
font-size: 14px;
}
.line {
margin-top: 22px;
height: 1px;
background-color: #584D4D;
}
.bottom-links {
text-align: center;
margin-top: 47px;
}
.bottom-links-list {
display: inline-block;
}
.bottom-links-list li {
float: left;
}
.bottom-links-list li a {
padding: 0 26px;
border-right: 1px solid white;
color: white;
}
.bottom-links-list li:first-child a {
padding-left: 0;
}
.bottom-links-list li:last-child a {
padding-right: 0;
border: 0;
}
.copyright {
margin-top: 10px;
color: white;
}
/* #endregion页脚区end */