css reset及部分layout样式
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
audio,
canvas,
progress,
video {
display: inline-block;
vertical-align: baseline;
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden],
template {
display: none;
}
a {
background-color: transparent;
}
a:active,
a:hover {
outline: 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
mark {
background: #ff0;
color: #000;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 1em 40px;
}
hr {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
pre {
overflow: auto;
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
color: inherit;
font: inherit;
margin: 0;
}
button {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],
html input[disabled] {
cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
input {
line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
input[type="search"] {
-webkit-appearance: textfield;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
border: 0;
padding: 0;
}
textarea {
overflow: auto;
}
optgroup {
font-weight: bold;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
/*这是以前的reset样式,现在新流行一种normal.css,致力于把使各个浏览器表现不一致的地方表现一致*/
@charset "utf-8"; /*reset css for PC*/
body,div{
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
} body, dl, dd, h1, h2, h3, h4, h5, h6, form{
margin:0;
} body, p, input, textarea, select, button {
font-family: 'Hiragino Sans GB','\5fae\8f6f\96c5\9ed1',arial,DroidSansFallback,sans-serif,simsun;
/*解决移动设备滑动阻滞的问题*/
-webkit-overflow-scrolling: touch;
} ol,ul{
margin:0;
padding:0;
list-style:inside none;
} input[type='submit'], input[type='button'], input[type='reset'],a {
cursor: pointer;
} textarea {
resize: vertical;
} a:link, a:visited {
text-decoration: none;
} p{
text-align: justify;
word-break: break-word;
} i, em, address {
font-style: normal;
} table {
border-collapse: collapse;
margin: 0;
} h1, h2, h3, h4, h5, h6 {
font-weight: normal;
vertical-align: middle;
} header, section, article, aside, footer, nav, dialog, figure {
display: block;
} img {
max-width: 100%;
height: auto;
border: none;
/*IE下图片缩放失真的解决方法*/
-ms-interpolation-mode: bicubic;
} blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after, q:before, q:after {
content: '';
content: none;
} :focus{
outline:0;
}
::selection {
background: #e57779;
color: #fff;
} ::-moz-selection {
background: #e57779;
color: #fff;
} /*form placeholder*/
:-moz-placeholder { /* Firefox 18- */}
::-moz-placeholder {/* Firefox 19+ */} /*layout css*/
.wrap {
width: 1000px;
margin: 0 auto;
} .limit {
width: 100%;
overflow: hidden;
}
.pr {
position: relative;
z-index: 0;
} .pa {
position: absolute;
} .fl {
float: left;
_display: inline;/*IE6 解决双边距问题*/
} .fr {
float: right;
_display: inline;/*IE6 解决双边距问题*/
} .clearfix:after, .tolist:after {
content:"\200B";
display:block;
height:0;
clear:both;
} .tolist li {
float: left;
display: block;
} .tolist li:last-child {
margin-right: 0 !important;
} .radius {
border-radius: 50%;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
} .ellipsis {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} /*WebKit*/
.ellipsis_3 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
} .opacity_bg {
background: rgba(0, 0, 0, 0.8);
filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#AF000000,endcolorstr=#AF000000,gradientType=1);
/*filter:alpha(opacity=50);*/
/*-moz-opacity:0.5;*/
/*-khtml-opacity:0.5;*/
/*opacity: 0.5;*/
} /*page*/
.page {
padding: 30px 0 60px 0;
text-align: center;
} .pages{
display: inline-block;
}
.pages a {
display: inline-block;
color: #999;
font-family: simsun;
padding: 1px 15px;
border: 1px solid #bdbdbd;
} .pages .on,.pages a:hover {
border: 1px solid #00B786;
color: #FFFFFF;
background: #00B786;
} .page .prev,.page .next,.page .prev a,.page .next a{ font-size: 14px; color: #999; font-family: simsun; display: inline-block;}
.page .prev{ float: left;}
.page .next{ float: right;}
.page .prev a,.page .next a{ color: #79503E;}
.page .prev a:hover,.page .next a:hover{ text-decoration: underline;}
css reset及部分layout样式的更多相关文章
- CSS Reset / Normalize 如何进行样式重置
CSS Reset 过于激进,所有样式全部消除没有必要. 关键是保持各种浏览器的兼容,包括Bootstrap的CSS Reset也是走的这个路线. 线面这个就是后面一种思路的成果: http://ne ...
- css reset重置样式有那么重要吗?
在以前写html代码的时候,一般都会在head里添加重置样式reset.css,其内容如下: @charset "utf-8"; html, body, div, span, ap ...
- 一天搞定CSS: 标签样式初始化(CSS reset)及淘宝样式初始化代码--09
样式初始化:是指对HTML中某些标签的默认样式进行清除 样式初始化目的: 不同浏览器的默认样式不一样,若不清理,会导致相同的代码在浏览器中解析结果不一样,为了避免这种情况,所以需要进行样式初始化. 代 ...
- 重置浏览器的默认样式(css reset)
(1)定义:首先css reset指的是重置浏览器的默认样式 (2)作用:因为现在的浏览器很多,并且每个浏览器都有自己的默认样式,这样就会导致一个页面在多个浏览器下展示产生差异,所以我们需要做一些处理 ...
- 重置默认样式 css reset
html { overflow-x:auto; overflow-y:scroll; } body, dl, dt, dd, ul, ol, li, pre, form, fieldset, inpu ...
- CSS RESET —— 浏览器样式重置
CSS Reset 1. CSS Reset为什么存在? 只要您的客户存在使用不同浏览器(ie,firefox,chrome等)的可能,那你就不得不从完美的理想状态回到现实,因为不同核心的浏览器对CS ...
- CSS Reset(样式重置)
CSS Reset,意为重置默认样式.HTML中绝大部分标签元素在网页显示中都有一个默认属性值,通常为了避免重复定义元素样式,需要进行重置默认样式(CSS Reset).举几个例子:1.淘宝(CSS ...
- 清除浏览器默认样式——css reset & normalize.css
css reset 自己挨个清除很麻烦 可以使用网上一些css库——css reset 把模板复制到css文件最上方,其他的样式我们自己编写来覆盖它们 但是这个也有一些弊端,会把一些本来需要的样式给清 ...
- 默认样式重置 (css reset)
body,p,h1,h2,h3,h4,h5,h6,dl,dd,t{margin:0; font-size:12px;/* font-family:XX; */} ol,ul{list-style:no ...
随机推荐
- 剖析SSH核心原理(一)
在我前面的文章中,也试图总结过SSH,见 http://blog.csdn.net/shan9liang/article/details/8803989 ,随着知识的积累,总感觉以前说得比较笼统, ...
- Ubuntu12.10 下搭建基于KVM-QEMU的虚拟机环境(十六)
今天我们继续实验Bridge方式的网络配置. Bridge的逻辑原理图如下: 上图中的“br0”就充当了一个桥的作用,主机上的物理网口eth0等根据需要加入到这个桥里面,所有虚拟机要跟外界通信都通过这 ...
- C++的优秀特性2:inline 函数
(转载请注明原创于潘多拉盒子) Inline函数是C++的一个很小的特性,在不计较效率的情况下,这个特性似乎可有可无.然而,C++天生是为最为广泛的应用场景设计的,因此,总会有关于效率的问题.其实,除 ...
- C#中Thread类中Join方法的理解(转载)
指在一线程里面调用另一线程join方法时,表示将本线程阻塞直至另一线程终止时再执行 比如 using System; namespace TestThreadJoin { class Pro ...
- Oracle 自己主动诊断资料档案库 (ADR)、自己主动诊断工作流、ADRCI工具
1.自己主动诊断工作流: 通过一个始终处于打开状态的内存中跟踪工具,数据库组件能够在第一次出现严重错误故障时捕获诊断数据.系统将自己主动维护一个称为"自己主动诊断资料档案库"的特殊 ...
- JavaScript宝座:七大框架论剑
JavaScript宝座:七大框架论剑 一周前,Throne of JS大会在多伦多召开,这应该是我参加过的最有料也最不一样的一次大会.大会官网如是说: 加载整个页面,然后再“渐进增强”以添加动态行为 ...
- 【UML】具体解释六种关系
UML中包括六中关系.各自是:关联(Association).聚合(Aggregation).组合(Composition).泛化(Generalization).依赖(Dependency).实现( ...
- Center OS jdk tomcat安装
一.jdk安装 1.下载jdk jdk-6u26-linux-i586-rpm.bin 2 安装jdk #sh jdk-6u26-linux-i586-rpm.bin 3.#set ...
- this class is not key value coding-compliant for the key XXX错误的解决方法
转自:http://www.cnblogs.com/zhangronghua/archive/2012/03/16/iOSError1.html 今天在听iOS开发讲座时,照着讲座的demo输入代码, ...
- 基于html5实现的愤怒的小鸟网页游戏
之前给大家分享一款基于html5 canvas和js实现的水果忍者网页版,今天给大家分享一款基于html5实现的愤怒的小鸟网页游戏.这款游戏适用浏览器:360.FireFox.Chrome.Safar ...