html源码(html+css)

时间:2024-10-20 18:00:54
* { margin: 0; padding: 0; margin: 0 auto; text-align: center; } body { background-color: #f3f5f7; } a { text-decoration: none; } .header { width: 1200px; height: 42px; margin: 30px auto; } .logo { width: 197px; height: 42px; float: left; } .nav ul li a { text-decoration: none; padding: 0 10px; height: 42px; display: block; line-height: 42px; font-size: 18px; color: #050505; font-family: 微软雅黑; } li { list-style: none; } .nav { height: 42px; float: left; margin-left: 80px; } .nav ul li { float: left; margin: 0 15px; } .nav ul li a:hover { border-bottom: 2px solid #00a4ff; color: #00a4ff; } .search { width: 412px; height: 42px; float: left; margin-left: 50px; } .search input { float: left; width: 345px; height: 40px; border: 1px solid #00A4FF; border-right: 0px; font-size: 14px; font-family: 微软雅黑; color: #bfbfbf; padding-left: 15px; } .search button { float: left; width: 50px; height: 42px; background:url(images/); border: 0; } .user { font-size: 14px; color: #666666; float: right; line-height: 42px; margin-right: 30px; } .banner { height: 420px; background-color: #1c036c; } .banner-o { width: 1200px; height: 420px; margin: 0 auto; background: url(images/); background-repeat: no-repeat; background-position: top center; } .subnav { width: 190px; height: 420px; background: rgba(0,0,0,0.3); float: left; } .subnav ul li a { font-size: 14px; color: #ffffff; text-decoration: none; } .subnav ul li { height: 45px; line-height: 45px; padding: 0 20px; } .subnav ul li a span { float: right; } .subnav ul li a:hover{ color: #00b4ff; } .course { width: 230px; height: 300px; float: right; background-color: #ffffff; margin-top: 50px; } .course h2 { width: 230px; height: 48px; line-height: 48px; color:#ffffff; text-align: center; font-size: 18px; background-color: #9bceea; } .course-o { padding: 0 20px; } .course-o ul li { padding: 15px 0; border-bottom: 1px solid #a5a5a5; } .course-o ul li h4 { font-size: 16px; color: #4e4e4e; } .course-o ul li p { font-size: 12px; color: #a5a5a5; } .course-o .more{ display: block; color: #00a4ff; border: 1px solid #00a4ff; height: 40px; font-size: 16px; text-align: center; line-height: 40px; margin-top: 3px; font-weight: 700; } .shoping { height: 60px; width: 1200px; background-color: #ffffff; margin: 10px auto; box-shadow: 0px 2px 3px 3px rgba(0,0,0,0.1); line-height: 60px; } .shoping h3{ margin-left: 30px; float: left; font-size: 16px; color: #00a4ff; } .shoping ul li a { float: left; padding: 0 30px; font-size: 16px; color: #050505; } .shoping .shoping-o{ margin-right: 30px; float: right; font-size: 14px; color: #00a4ff; } .box { width: 1200px; margin: 34px auto; } .box-head { height: 40px; } .box-head h3{ font-size: 20px; color: #494949; line-height: 34px; float: left; } .box-head a { font-size: 12px; color: #a5a5a5; float: right; line-height: 34px; padding-right: 30px; } .box-body ul { width: 1225px; } .box-body ul li { width: 228px; height: 270px; float: left; background-color: #ffffff; margin-right:15px ; margin-bottom: 15px; } .box-body ul li { position: relative; } .box-body ul li .img { width: 100%; } .box-body ul li h3 { font-size: 14px; color: #050505; margin: 25px 20px 15px 25px; } .box-body ul .box-body-div{ font-size: 12px; color: #999999; margin-left: 25px; } .box-body ul .box-body-div span{ color: #ff7c2d; } .box-body ul li em img{ position: absolute; top: 4px; right: -4px; } .footer { height: 417px; } .clear { clear: both; } .footer-o { width: 1200px; margin: 0 auto; padding-top: 35px; } .footer-o-left{ float: left; } .footer-o-right { float: right; } .footer-o-left p { font-size: 12px; color: #666666; margin: 20px 0px 15px 0px; } .footer-o-left-app { display: block; font-size: 16px; color: #00a4ff; border: 1px solid #00a4ff; width: 120px; height: 35px; line-height: 35px; text-align: center; } dl { float: left; } .footer-o-right dt { font-size: 16px; color: #333333; margin-bottom: 15px; } .footer-o-right dd { font-size: 12px; color: #333333; padding-bottom: 5px; } .footer-o-right dl { margin-left: 150px; } .fix { position: fixed; top: 550px; left: 20px; }