初学前端,花了几天时间学了CSS,发现翻来覆去常用的就只有几个点,所以做了一个静态页面的案例(只会这些),JS还没学完,后期再补吧。有需要素材的可以留言鸭~
包含title、description、keywords以及网页标题顶部的icon
网页底部
分为四个文件夹,分别是CSS、images、fonts、js(以后存放js文件)。其中CSS中包含base.css, index.css, normalize.css。
images存放需要用到的图片,fonts存放字体图标
结构index.html
index.html
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<title>京东(JD.COM)-正品低价、品质保障、配送及时、轻松购物!title>
<meta name="description"
content="京东JD.COM-专业的综合网上购物商城,销售家电、数码通讯、电脑、家居百货、服装服饰、母婴、图书、食品等数万个品牌优质商品.便捷、诚信的服务,为您提供愉悦的网上购物体验!"/>
<meta name="Keywords" content="网上购物,网上商城,手机,笔记本,电脑,MP3,CD,VCD,DV,相机,数码,配件,手表,存储卡,京东"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/index.css">
head>
<body>
<header>
<div class="w">
<a href="#">
<img src="images/header.jpg" alt="">
a>
div>
header>
<div class="shortcut">
<div class="w">
<ul class="fl city">
<li>
<i class="f10">i>
<a href="#">北京a>
li>
ul>
<ul class="fr">
<li><a href="#">您好!请登录a>
<a href="#" class="f10">免费注册a>
li>
<li class="space">li>
<li><a href="#">我的订单a>li>
<li class="space">li>
<li><a href="#">我的京东a>
<i>i>li>
<li class="space">li>
<li><a href="#">京东会员a>li>
<li class="space">li>
<li><a href="#">企业采购a>li>
<li class="space">li>
<li><a href="#">客服服务a>
<i>i>li>li>
<li class="space">li>
<li><a href="#">网站导航a>
<i>i>li>li>
<li class="space">li>
<li><a href="#" class="mobile">手机APP
<img src="images/mobile.png">a>
li>
<li class="space">li>
ul>
div>
div>
<div class="w middle">
<div class="logo">
<h1><a href="#">
<img src="images/logo.png">
a>h1>
div>
<div class="search">
<input type="text" placeholder="加湿器">
<button><i>i>button>
div>
<div class="shopCar">
<i>i>
<a href="#" class="f10">我的购物车a>
<span>0span>
div>
<div class="hotwords">
<a href="#">满199减100a>
<a href="#">食品饮料a>
<a href="#">品质家具a>
<a href="#">5Ga>
<a href="#">冰果诱惑a>
<a href="#">母亲节a>
div>
<div class="ad-l">
<img src="images/ad-l.png" width="200px">
div>
<div class="navitems">
<ul>
<li><a href="#">秒杀a>li>
<li><a href="#">优惠券a>li>
<li><a href="#">PLUS会员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>
div>
div>
<div class="w grid">
<div class="grid-col1 fl">
<ul>
<li><a href="#">家用电器a>li>
<li><a href="#">手机a><span>/span><a href="#">运营商a><span>/span><a href="#">数码a>li>
<li><a href="#">电脑a><span>/span><a href="#">办公a>li>
<li><a href="#">家具a><span>/span><a href="#">家居a><span>/span><a href="#">家装a><span>/span><a href="#">厨具a>li>
<li><a href="#">男装a><span>/span><a href="#">女装a><span>/span><a href="#">童装a><span>/span><a href="#">内衣a>li>
<li><a href="#">美妆个护a><span>/span><a href="#">宠物a>li>
<li><a href="#">女鞋a><span>/span><a href="#">箱包a><span>/span><a href="#">钟表a><span>/span><a href="#">珠宝a>li>
<li><a href="#">男鞋a><span>/span><a href="#">运动a><span>/span><a href="#">户外a>li>
<li><a href="#">汽车a><span>/span><a href="#">汽车用品a>li>
<li><a href="#">母婴a><span>/span><a href="#">玩具a>li>
<li><a href="#">食品a><span>/span><a href="#">酒类a><span>/span><a href="#">生鲜a><span>/span><a href="#">特产a>li>
<li><a href="#">礼品鲜花a><span>/span><a href="#">农资绿植a>li>
<li><a href="#">医疗a><span>/span><a href="#">药品a>li>
<li><a href="#">图书a><span>/span><a href="#">音响a><span>/span><a href="#">电子书a>li>
<li><a href="#">旅游a><span>/span><a href="#">机票a><span>/span><a href="#">酒店a>li>
<li><a href="#">理财a><span>/span><a href="#">众筹a><span>/span><a href="#">保险a><span>/span><a href="#">白条a>li>
ul>
div>
<div class="grid-col2 fl">
<div class="grid-col2-t">
<a href="#"><img src="images/banner.jpg">a>
<a class="arrow-l" href="#"> < a>
<a class="arrow-r" href="#"> > a>
<ul class="circle">
<li>li>
<li class="current">li>
<li>li>
<li>li>
<li>li>
<li>li>
<li>li>
<li>li>
ul>
div>
<div class="grid-col2-b">
<div><img src="images/l.jpg">div>
<div><img src="images/r.jpg">div>
div>
div>
<div class="grid-col3 fr">
<div class="login">
<div class="login-t">
Hi,欢迎来到京东!<br>
<a href="#">登录a>
<a href="#">注册a>
<a class="user-photo" href="#">
<img src="images/no_login.jpg">
a>
div>
<div class="login-b">
<a href="#">新人福利a>
<a href="#">PLUS会员a>
div>
div>
<div class="news">
<div class="news-t">
<a class="promotion" href="#">促销a>
<a class="gg" href="#">公告a>
<a class="more" href="#">更多a>
<div>div>
div>
<div class="news-b">
<a href="#">飘柔,挑战3天不洗头a>
<a href="#">ADM锐龙首发a>
<a href="#">家具狂欢领199减100a>
<a href="#">益生菌领劵满300减100a>
div>
div>
<div class="expand">
<ul>
<li>
<a href="#"><div>div><span>话费span>a>
li>
<li>
<a href="#"><div>div><span>话费span>a>
li>
<li>
<a href="#"><div>div><span>话费span>a>
li>
<li>
<a href="#"><div>div><span>话费span>a>
li>
<li>
<a href="#"><div>div><span>话费span>a>
li>
<li>
<a href="#"><div>div><span>话费span>a>
li>
<li>
<a href="#"><div>div><span>话费span>a>
li>
<li>
<a href="#"><div>div><span>话费span>a>
li>
<li>
<a href="#"><div>div><span>话费span>a>
li>
<li>
<a href="#"><div>div><span>话费span>a>
li>
<li>
<a href="#"><div>div><span>话费span>a>
li>
<li>
<a href="#"><div>div><span>话费span>a>
li>
ul>
div>
div>
div>
<footer>
<div class="service">
<ul class="w">
<li>
<h5>h5>
<p>品类齐全轻松购物p>
li>
<li>
<h5>h5>
<p>品类齐全轻松购物p>
li>
<li>
<h5>h5>
<p>品类齐全轻松购物p>
li>
<li>
<h5>h5>
<p>品类齐全轻松购物p>
li>
ul>
div>
<div class="w help">
<div class="fl">
<dl>
<dt>购物指南dt>
<dd><a href="#">购物流程a>dd>
<dd><a href="#">会员介绍a>dd>
<dd><a href="#">生活旅行a>dd>
<dd><a href="#">常见问题a>dd>
<dd><a href="#">大家电a>dd>
<dd><a href="#">联系客服a>dd>
dl>
<dl>
<dt>配送方式dt>
<dd><a href="#">上门自提a>dd>
<dd><a href="#">211限时达a>dd>
<dd><a href="#">配送服务查询a>dd>
<dd><a href="#">配送费收取标准a>dd>
<dd><a href="#">海外配送a>dd>
dl>
<dl>
<dt>支付方式dt>
<dd><a href="#">货到付款a>dd>
<dd><a href="#">在线支付a>dd>
<dd><a href="#">分期付款a>dd>
<dd><a href="#">公司转账a>dd>
dl>
<dl>
<dt>售后服务dt>
<dd><a href="#">售后政策a>dd>
<dd><a href="#">价格保护a>dd>
<dd><a href="#">退款说明a>dd>
<dd><a href="#">返修/退换货a>dd>
<dd><a href="#">取消订单a>dd>
dl>
<dl>
<dt>特色服务dt>
<dd><a href="#">夺宝岛a>dd>
<dd><a href="#">DIY装机a>dd>
<dd><a href="#">京东E卡a>dd>
<dd><a href="#">京东通信a>dd>
<dd><a href="#">京鱼座智能a>dd>
dl>
div>
<div class="fr coverage">
<h5>京东自营覆盖区县h5>
<p>京东已向全国2661个区县提供自营配送服务,支持货到付款、POS机刷卡和售后上门服务。p>
<a href="#">查看详情a>
div>
div>
<div class="w copyright">
<p>
<a href="#">关于我们a><span>|span>
<a href="#">联系我们a><span>|span>
<a href="#">联系客服a><span>|span>
<a href="#">合作招商a><span>|span>
<a href="#">商家帮助a><span>|span>
<a href="#">营销中心a><span>|span>
<a href="#">手机京东a><span>|span>
<a href="#">友情链接a><span>|span>
<a href="#">销售联盟a><span>|span>
<a href="#">京东社区a><span>|span>
<a href="#">风险监测a><span>|span>
<a href="#">隐私政策a><span>|span>
<a href="#">京东公益a><span>|span>
<a href="#">English Sitea><span>|span>
<a href="#">Media & IRa>
p>
<div>
<p>京公网安备 11000002000088号<span>|span>京ICP证070359号<span>|span>互联网药品信息服务资格证编号(京)-经营性-2014-0008<span>|span>新出发京零 字第大120007号p>
<p>互联网出版许可证编号新出网证(京)字150号<span>|span>出版物经营许可证<span>|span>网络文化经营许可证京网文[2014]2148-348号<span>|span>违法和不良信息举报电话:4006561155p>
<p>Copyright © 2004 - 2020 京东JD.com 版权所有|消费者维权热线:4006067733经营证照<span>|span>(京)网械平台备字(2018)第00003号<span>|span>营业执照p>
div>
<div class="foot_icon">
<a href="#">a>
<a href="#">a>
<a href="#">a>
<a href="#">a>
<a href="#">a>
<a href="#">a>
div>
div>
footer>
body>
html>
normalize.css
normalize.css
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
/*
http://necolas.github.io/normalize.css/
*/
/**
* 1. Change the default font family in all browsers (opinionated).
* 2. Correct the line height in all browsers.
* 3. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
/* Document
========================================================================== */
html {
font-family: sans-serif; /* 1 */
line-height: 1.15; /* 2 */
-ms-text-size-adjust: 100%; /* 3 */
-webkit-text-size-adjust: 100%; /* 3 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main { /* 1 */
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
a:active,
a:hover {
outline-width: 0;
}
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: sans-serif; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
*/
details, /* 1 */
menu {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Scripting
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
template {
display: none;
}
/* Hidden
========================================================================== */
/**
* Add the correct display in IE 10-.
*/
[hidden] {
display: none;
}
base.css
@font-face {
font-family: 'icomoon';
src: url('../fonts/icomoon.eot?1x1j55');
src: url('../fonts/icomoon.eot?1x1j55#iefix') format('embedded-opentype'),
url('../fonts/icomoon.ttf?1x1j55') format('truetype'),
url('../fonts/icomoon.woff?1x1j55') format('woff'),
url('../fonts/icomoon.svg?1x1j55#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
body {
background-color: #f6f6f6;
}
image {
vertical-align: middle;
}
input,button {
outline: none;
border: 0;
}
blockquote,body,button,dd,dl,dt,fieldset,form,h1,h2,h3,h4,h5,h6,hr,input,legend,li,ol,p,pre,td,textarea,th,ul {
margin: 0;
padding: 0;
}
ul {
list-style: none;
}
a {
font-size: 12px;
color: #999999;
text-decoration: none;
}
a:hover {
color: #e33333;
}
.w {
width: 1200px;
margin: 0 auto;
}
.f10 {
color: #f10215!important;
}
.fl {
float: left;
}
.fr {
float: right;
}
header {
width: 100%;
height: 80px;
background-color: #000000;
}
.shortcut {
width: 100%;
height: 30px;
line-height: 30px;
font-size: 12px;
color: #999999;
background-color: #e3e4e5;
border-bottom: 1px solid #dddddd;
}
.shortcut i {
font-family: 'icomoon';
font-style: normal;
color: #cccccc;
}
.city {
margin-left: 200px;
}
.fr li {
float: left;
/*padding: 0 13px;*/
}
.space {
width: 1px;
height: 10px;
background-color: #cccccc;
margin: 10px 12px 0;
}
.mobile {
position: relative;
}
.mobile img {
position: absolute;
left: -4px;
top: 23px;
border: 1px solid #cccccc;
}
.middle {
height: 140px;
position: relative;
}
.middle .ad-l {
position: absolute;
left: -200px;
top: 145px;
}
.middle .logo {
position: absolute;
top: -30px;
left: 0;
box-shadow: 0px -10px 10px rgba(0,0,0,0.3);
}
.logo a {
display: block;
width: 190px;
height: 170px;
background-color: #fff;
}
.search {
width: 550px;
height: 35px;
background-color: pink;
position: absolute;
top: 25px;
left: 320px;
}
.search input {
width: 493px;
height: 33px;
border: 1px solid #f10215;
font-size: 12px;
padding-left: 5px;
float: left;
}
.search button {
height: 35px;
width: 50px;
background-color: #f10215;
float: left;
}
.search button i {
font-family: 'icomoon';
font-style: normal;
font-size: 18px;
color: white;
}
.shopCar {
width: 188px;
height: 33px;
line-height: 33px;
border: 1px solid #e3e4e5;
position: absolute;
text-align: center;
top: 25px;
right: 95px;
}
.shopCar i {
font-family: 'icomoon';
color: #f10215;
font-style: normal;
}
.shopCar span {
font-size: 12px;
color: white;
width: 15px;
height: 15px;
line-height: 15px;
background-color: #f10215;
border-radius: 50%;
position: absolute;
top: 4px;
right: 35px;
}
.hotwords {
position: absolute;
top:70px;
left: 320px;
}
.hotwords a {
margin-right: 4px;
}
.navitems {
width: 790px;
height: 25px;
position: absolute;
bottom: 0;
left: 200px;
}
.navitems ul li {
float: left;
margin-left: 30px;
}
/*.navitems .space {
height: 15px;
margin: 3px 5px;
}*/
.navitems li a {
font-size: 14px;
color: #555555;
}
.navitems li a:hover {
color: #f10215;
}
footer {
height: 500px;
background-color: #eaeaea;
margin-top: 40px;
}
footer .service {
border-bottom: 1px solid #dedede;
height: 103px;
}
.service ul {
padding: 30px 0;
}
.service ul li {
height: 43px;
width: 295px;
line-height: 43px;
float: left;
position: relative;
}
.service li h5 {
width: 37px;
height: 43px;
background: url("../images/ico.png") no-repeat;
position: absolute;
left: 38px;
top: 0;
}
.service li:nth-child(2) h5 {
background-position: 0 -43px;
}
.service li:nth-child(3) h5 {
background-position: 0 -86px;
}
.service li:nth-child(4) h5 {
background-position: bottom;
}
.service li p {
padding-left: 80px;
font-weight: bold;
color: #444444;
}
/*帮助模块*/
.help {
height: 200px;
border-bottom: 1px solid #dedede;
padding-top: 26px;
box-sizing: border-box;
}
.help dl {
width: 194px;
float: left;
}
.help dl dt {
height: 25px;
font-size: 14px;
color: #666666;
font-weight: 700;
}
.help dl dd {
height: 21px;
}
.coverage {
width: 200px;
height: 150px;
background: url("../images/ico_footer.png") no-repeat;
}
.coverage h5 {
height: 25px;
color: #666666;
font-size: 14px;
font-weight: 700;
padding-left: 35px;
}
.coverage p {
font-size: 12px;
color: #666666;
line-height: 18px;
width: 180px;
padding-left: 10px;
}
.coverage a {
display: block;
margin-top: 5px;
width: 180px;
text-align: right;
}
/*版权*/
.copyright {
color: #666666;
font-size: 12px;
margin-top: 20px;
text-align: center;
}
.copyright div {
margin-top: 17px;
line-height: 20px;
color: #999999;
}
.copyright span {
margin: 0 12px;
}
.foot_icon a {
display: inline-block;
width: 103px;
height: 33px;
background: url("../images/ico_footer.png") no-repeat 0 -150px;
}
.foot_icon a:nth-child(2) {
background-position: -103px -150px;
}
.foot_icon a:nth-child(3) {
background-position: 0px -185px;
}
.foot_icon a:nth-child(4) {
background-position: -106px -186px;
}
.foot_icon a:nth-child(5) {
background-position: 0px -219px;
}
.foot_icon a:nth-child(6) {
background-position: -106px -219px;
}
index.css
/*中间分类模块开始*/
/*1*/
.grid {
height: 480px;
}
.grid-col1 {
width: 190px;
height: 100%;
background-color: #6e6568;
padding: 17px 0;
box-sizing: border-box;
}
.grid-col1 ul {
font-size: 12px;
color: #ffffff;
}
.grid-col1 ul li {
height: 28px;
line-height: 28px;
padding-left: 14px;
}
.grid-col1 ul li:hover {
background-color: #cccccc;
}
.grid-col1 span {
margin: 0 3px;
}
.grid-col1 a {
font-size: 14px;
color: #ffffff;
}
.grid-col1 a:hover {
color: #f10215;
}
/*2*/
.grid-col2 {
width: 790px;
height: 100%;
margin-left: 15px;
}
.grid-col2-t {
position: relative;
}
.arrow-l, .arrow-r {
width: 22px;
height: 60px;
background:rgba(0, 0, 0, .2);
position: absolute;
top: 50%;
transform: translateY(-15px);
line-height: 60px;
font-size: 26px;
color: rgba(0,0,0,.3);
padding-left: 8px;
}
.arrow-l {
left: 0;
}
.arrow-r {
right: 0;
}
.grid-col2-t ul {
width: 170px;
height: 20px;
background: rgba(255, 255,255,0.3);
position: absolute;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
border-radius: 10px;
padding-left: 5px;
}
.grid-col2-t ul li {
height: 12px;
width: 12px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.6);
float: left;
margin: 4px;
cursor: pointer;
}
.grid-col2-t .current {
background-color: #f10215;
}
.grid-col2-t ul li:hover {
background-color: #f10215;
}
.grid-col2-b div {
float: left;
margin-top: 7px;
}
.grid-col2-b div:nth-child(2) {
float: right;
}
/*grid-col3*/
.grid-col3 {
width: 190px;
height: 100%;
background-color: #fff;
}
.login {
height: 115px;
border-bottom: 1px solid #cccccc;
padding: 15px;
box-sizing: border-box;
}
.login-t {
width: 95px;
height: 55px;
font-size: 12px;
line-height: 18px;
color: #666666;
padding-left: 55px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
position: relative;
}
.login-t a {
color: #666666;
}
.login-t a:hover {
color: #f10215;
}
.user-photo {
width: 50px;
height: 50px;
position: absolute;
left: 0;
top: 0;
}
.user-photo img {
width: 100%;
}
.login-b {
margin-top: 5px;
}
.login-b a {
font-size: 12px;
color: #f10215;
display: inline-block;
width: 58px;
height: 20px;
line-height: 20px;
border: 1px solid #f10215;
padding-left: 12px;
}
.news {
height: 154px;
border-bottom: 1px solid #cccccc;
padding: 7px 13px 0;
box-sizing: border-box;
}
.news-t {
width: 160px;
height: 19px;
border-bottom: 1px solid #cccccc;
position: relative;
}
.news-t a {
float: left;
height: 17px;
color: #333333;
line-height: 17px;
}
.promotion {
width: 38px;
border-right: 1px solid #cccccc;
}
.gg {
margin-left: 15px;
}
.news-t .more {
float: right;
}
.news-t div {
width: 28px;
height: 2px;
background-color: #f10215;
position: absolute;
left:0;
top: 18px;
}
.news-b {
height: 120px;
padding-top: 19px;
}
.news-b a {
display: block;
height: 23px;
color: #666666;
}
.expand {
height: 210px;
overflow: hidden;
}
.expand ul {
width: 195px;
}
.expand ul li {
width: 47px;
height: 69px;
float: left;
border-right: 1px solid #cccccc;
border-bottom: 1px solid #cccccc;
}
.expand li a {
display: block;
width: 30px;
height: 45px;
padding-top: 13px;
padding-left: 10px;
}
.expand a div {
width: 30px;
height: 30px;
background: url("../images/[email protected]") no-repeat;
}
.expand ul li:nth-child(1) {
background-position: 0 0;
}
/*中间分类模块结束*/