html+css实战185-版权内容

简介: html+css实战185-版权内容

     commom.css

/* 各个页面相同的样式表 : 头, 尾部 */
/* 版心 */
.wrapper {
    width: 1240px;
    margin: 0 auto;
}
/* 快捷导航 */
.shortcut {
    height: 52px;
    background-color: #333;
}
.shortcut .wrapper {
    height: 52px;
}
/* 目的: 所有的文字内容居右侧对齐 */
.shortcut .wrapper ul {
    float: right;
}
/* 目的: 让所有的文字在一行显示 */
.shortcut .wrapper li {
    float: left;
    line-height: 52px;
}
.shortcut .wrapper a {
    padding: 0 16px;
    border-right: 1px solid #666;
    font-size: 14px;
    color: #dcdcdc;
}
.shortcut .wrapper a span {
    display: inline-block;
    margin-right: 8px;
    width: 11px;
    height: 16px;
    background-image: url(../images/sprites.png);
    background-position: -160px -70px;
    vertical-align: middle;
}
/* 头部 */
.header {
    margin: 30px auto;
    height: 70px;
}
.logo {
    float: left;
    width: 207px;
    height: 70px;
}
.logo h1 {
    width: 207px;
    height: 70px;
}
.logo h1 a {
    display: block;
    width: 207px;
    height: 70px;
    background-image: url(../images/logo.png);
    background-size: contain;
    /* 目的: 让h1里面的字看不见 */
    font-size: 0;
}
.nav {
    float: left;
    margin-left: 40px;
    height: 70px;
}
.search {
    position: relative;
    float: left;
    margin-top: 24px;
    margin-left: 34px;
    width: 172px;
    height: 30px;
    border-bottom: 2px solid #e7e7e7;
}
.nav li {
    float: left;
    margin-right: 48px;
    line-height: 70px;
}
.nav li a {
    padding-bottom: 7px;
}
.nav li a:hover {
    color: #27ba9b;
    border-bottom: 1px solid #27ba9b;
}
.search input {
    padding-left: 30px;
    width: 172px;
    height: 28px;
}
.search input::placeholder {
    font-size: 14px;
    color: #ccc;
}
.search span {
    position: absolute;
    left: 2px;
    top: 0;
    /* display: inline-block; */
    width: 18px;
    height: 18px;
    background-image: url(../images/sprites.png);
    background-position: -79px -69px;
}
.car {
    position: relative;
    float: left;
    margin-top: 28px;
    margin-left: 15px;
    width: 23px;
    height: 23px;
    background-image: url(../images/sprites.png);
    background-position: -119px -69px;
}
.car span {
    /* 绝对定位, 盒子具备行内块特点 */
    position: absolute;
    right: -13px;
    top: -6px;
    width: 20px;
    height: 15px;
    background-color: #e26237;
    border-radius: 8px;
    font-size: 13px;
    color: #fff;
    text-align: center;
    line-height: 15px;
}
/* 版权footer */
.footer {
    height: 342px;
    background-color: #333;
}
.footer .wrapper {
    width: 1393px;
}
.footer .top {
    padding-top: 59px;
    padding-left: 135px;
    height: 175px;
    border-bottom: 3px solid #434343;
}
.footer .top li {
    position: relative;
    float: left;
    margin-right: 300px;
    width: 195px;
    height: 58px;
    line-height: 58px;
}
.footer .top li:last-child {
    margin-right: 0;
}
/* 伪元素添加的标签  行内 */
/* 如果行内块和行内文字无法通过vertical-align或行高对齐, 定位 */
.footer .top li::before {
    position: absolute;
    left: 0;
    top: 0;
    /* display: inline-block; */
    content: '';
    width: 58px;
    height: 58px;
    background-image: url(../images/sprites.png);
    vertical-align: middle;
}

index.html

/* 各个页面相同的样式表 : 头, 尾部 */
/* 版心 */
.wrapper {
    width: 1240px;
    margin: 0 auto;
}
/* 快捷导航 */
.shortcut {
    height: 52px;
    background-color: #333;
}
.shortcut .wrapper {
    height: 52px;
}
/* 目的: 所有的文字内容居右侧对齐 */
.shortcut .wrapper ul {
    float: right;
}
/* 目的: 让所有的文字在一行显示 */
.shortcut .wrapper li {
    float: left;
    line-height: 52px;
}
.shortcut .wrapper a {
    padding: 0 16px;
    border-right: 1px solid #666;
    font-size: 14px;
    color: #dcdcdc;
}
.shortcut .wrapper a span {
    display: inline-block;
    margin-right: 8px;
    width: 11px;
    height: 16px;
    background-image: url(../images/sprites.png);
    background-position: -160px -70px;
    vertical-align: middle;
}
/* 头部 */
.header {
    margin: 30px auto;
    height: 70px;
}
.logo {
    float: left;
    width: 207px;
    height: 70px;
}
.logo h1 {
    width: 207px;
    height: 70px;
}
.logo h1 a {
    display: block;
    width: 207px;
    height: 70px;
    background-image: url(../images/logo.png);
    background-size: contain;
    /* 目的: 让h1里面的字看不见 */
    font-size: 0;
}
.nav {
    float: left;
    margin-left: 40px;
    height: 70px;
}
.search {
    position: relative;
    float: left;
    margin-top: 24px;
    margin-left: 34px;
    width: 172px;
    height: 30px;
    border-bottom: 2px solid #e7e7e7;
}
.nav li {
    float: left;
    margin-right: 48px;
    line-height: 70px;
}
.nav li a {
    padding-bottom: 7px;
}
.nav li a:hover {
    color: #27ba9b;
    border-bottom: 1px solid #27ba9b;
}
.search input {
    padding-left: 30px;
    width: 172px;
    height: 28px;
}
.search input::placeholder {
    font-size: 14px;
    color: #ccc;
}
.search span {
    position: absolute;
    left: 2px;
    top: 0;
    /* display: inline-block; */
    width: 18px;
    height: 18px;
    background-image: url(../images/sprites.png);
    background-position: -79px -69px;
}
.car {
    position: relative;
    float: left;
    margin-top: 28px;
    margin-left: 15px;
    width: 23px;
    height: 23px;
    background-image: url(../images/sprites.png);
    background-position: -119px -69px;
}
.car span {
    /* 绝对定位, 盒子具备行内块特点 */
    position: absolute;
    right: -13px;
    top: -6px;
    width: 20px;
    height: 15px;
    background-color: #e26237;
    border-radius: 8px;
    font-size: 13px;
    color: #fff;
    text-align: center;
    line-height: 15px;
}
/* 版权footer */
.footer {
    height: 342px;
    background-color: #333;
}
.footer .wrapper {
    width: 1393px;
}
.footer .top {
    padding-top: 59px;
    padding-left: 135px;
    height: 175px;
    border-bottom: 3px solid #434343;
}
.footer .top li {
    position: relative;
    float: left;
    margin-right: 300px;
    width: 195px;
    height: 58px;
    line-height: 58px;
}
.footer .top li:last-child {
    margin-right: 0;
}I

image.png

相关文章
|
9天前
|
前端开发 JavaScript 开发工具
【HTML/CSS】入门导学篇
【HTML/CSS】入门导学篇
19 0
|
4天前
|
前端开发 搜索推荐 数据安全/隐私保护
HTML标签详解 HTML5+CSS3+移动web 前端开发入门笔记(四)
HTML标签详解 HTML5+CSS3+移动web 前端开发入门笔记(四)
14 1
|
4天前
|
PHP
web简易开发——通过php与HTML+css+mysql实现用户的登录,注册
web简易开发——通过php与HTML+css+mysql实现用户的登录,注册
|
11天前
|
JSON JavaScript 前端开发
js是什么、html、css
js是什么、html、css
|
12天前
|
XML 前端开发 JavaScript
css和html
【4月更文挑战第7天】css和html
12 0
|
1月前
|
JavaScript 前端开发 开发者
编程笔记 html5&css&js 071 JavaScript Symbol 数据类型
编程笔记 html5&css&js 071 JavaScript Symbol 数据类型
|
17天前
|
人工智能 前端开发 JavaScript
【前端设计】HTML+CSS+JavaScript基本特性
【前端设计】HTML+CSS+JavaScript基本特性
|
1月前
|
前端开发 JavaScript
从0到1:用HTML、CSS和JavaScript构建一个简单的待办事项列表
从0到1:用HTML、CSS和JavaScript构建一个简单的待办事项列表
26 0
|
1月前
|
JavaScript 前端开发
编程笔记 html5&css&js 079 JavaScript 循环语句
编程笔记 html5&css&js 079 JavaScript 循环语句
|
1月前
|
JavaScript 前端开发 开发者
编程笔记 html5&css&js 078 JavaScript 条件判断语句
条件判断语句是首先要接触的语句。通过条件判断来执行不同的代码块。