reset.css文件下载及剖析
@charset "utf-8";
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/ html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: ;
padding: ;
border: ;
font-size: %;
font: inherit;
vertical-align: baseline;
} /* make sure to set some focus styles for accessibility */
:focus {
outline: ;
} /* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
} body {
line-height: ;
} ol, ul {
list-style: none;
} blockquote, q {
quotes: none;
} blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
} table {
border-collapse: collapse;
border-spacing: ;
} input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-decoration,
input[type=search]::-webkit-search-results-button,
input[type=search]::-webkit-search-results-decoration {
-webkit-appearance: none;
-moz-appearance: none;
} input[type=search] {
-webkit-appearance: none;
-moz-appearance: none;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
} textarea {
overflow: auto;
vertical-align: top;
resize: vertical;
} /**
* Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
*/ audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: ;
max-width: %;
} /**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/ audio:not([controls]) {
display: none;
height: ;
} /**
* Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
* Known issue: no IE 6 support.
*/ [hidden] {
display: none;
} /**
* 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
* `em` units.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/ html {
font-size: %; /* 1 */
-webkit-text-size-adjust: %; /* 2 */
-ms-text-size-adjust: %; /* 2 */
} /**
* Address `outline` inconsistency between Chrome and other browsers.
*/ a:focus {
outline: thin dotted;
} /**
* Improve readability when focused and also mouse hovered in all browsers.
*/ a:active,
a:hover {
outline: ;
} /**
* 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
* 2. Improve image quality when scaled in IE 7.
*/ img {
border: ; /* 1 */
-ms-interpolation-mode: bicubic; /* 2 */
} /**
* Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
*/ figure {
margin: ;
} /**
* Correct margin displayed oddly in IE 6/7.
*/ form {
margin: ;
} /**
* Define consistent border, margin, and padding.
*/ fieldset {
border: 1px solid #c0c0c0;
margin: 2px;
padding: .35em .625em .75em;
} /**
* 1. Correct color not being inherited in IE 6/7/8/9.
* 2. Correct text not wrapping in Firefox 3.
* 3. Correct alignment displayed oddly in IE 6/7.
*/ legend {
border: ; /* 1 */
padding: ;
white-space: normal; /* 2 */
*margin-left: -7px; /* 3 */
} /**
* 1. Correct font size not being inherited in all browsers.
* 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
* and Chrome.
* 3. Improve appearance and consistency in all browsers.
*/ button,
input,
select,
textarea {
font-size: %; /* 1 */
margin: ; /* 2 */
vertical-align: baseline; /* 3 */
*vertical-align: middle; /* 3 */
} /**
* Address Firefox 3+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/ button,
input {
line-height: normal;
} /**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
* Correct `select` style inheritance in Firefox 4+ and Opera.
*/ button,
select {
text-transform: none;
} /**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
* 4. Remove inner spacing in IE 7 without affecting normal text inputs.
* Known issue: inner spacing remains in IE 6.
*/ button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
*overflow: visible; /* 4 */
} /**
* Re-set default cursor for disabled elements.
*/ button[disabled],
html input[disabled] {
cursor: default;
} /**
* 1. Address box sizing set to content-box in IE 8/9.
* 2. Remove excess padding in IE 8/9.
* 3. Remove excess padding in IE 7.
* Known issue: excess padding remains in IE 6.
*/ input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: ; /* 2 */
*height: 13px; /* 3 */
*width: 13px; /* 3 */
} /**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/ input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
} /**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/ input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
} /**
* Remove inner padding and border in Firefox 3+.
*/ button::-moz-focus-inner,
input::-moz-focus-inner {
border: ;
padding: ;
} /**
* 1. Remove default vertical scrollbar in IE 6/7/8/9.
* 2. Improve readability and alignment in all browsers.
*/ textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
} /**
* Remove most spacing between table cells.
*/ table {
border-collapse: collapse;
border-spacing: ;
} html,
button,
input,
select,
textarea {
color: #;
} ::-moz-selection {
background: #b3d4fc;
text-shadow: none;
} ::selection {
background: #b3d4fc;
text-shadow: none;
} img {
vertical-align: middle;
} fieldset {
border: ;
margin: ;
padding: ;
} textarea {
resize: vertical;
} .chromeframe {
margin: .2em ;
background: #ccc;
color: #;
padding: .2em ;
}
/* 两者相+完整版 */
/* 涉及到的H5新标签,之后课程做介绍 */
html{
color:#;/*默认字体颜色黑色*/
background:#fff;/*默认背景白色*/
overflow-y:scroll;/*纵向滚动*/
/*文本大小根据设备尺寸进行调整,取值auto自动、none不调整、percentage百分比*/
-webkit-text-size-adjust:%;/*用百分比来指定文本大小在设备尺寸不同的情况下如何调整*/
-ms-text-size-adjust:%;
/*快速滚动和回弹的效果,允许独立的滚动区域和触摸回弹,WebKit私有的属性*/
-webkit-overflow-scrolling:touch
}
/*
-webkit-text-size-adjust: 100%;
解决的是chrome等以webkit为内核的浏览器下不支持小于12px的问题,在chrome下,缩小网页,其他元素缩小,但是字体大小不变的问题。
-ms-text-size-adjust: 100%;;解决IE的字体调整问题。
*/
html *{
outline:;
-webkit-text-size-adjust:none;
/*
当用户轻按一个链接或者JavaScript可点击元素时给元素覆盖一个高亮色。
如果想取消这个高亮,将值设置为全透明即可,比如transparent
*/
-webkit-tap-highlight-color:transparent;
}
/*
拓展:
(1)设置用户是否能够选中文本user-select
取值:none:文本不能被选择;
text:可以选择文本
all:当所有内容作为一个整体时可以被选择。如果双击或者在上下文上点击子元素,
那么被选择的部分将是以该子元素向上回溯的最高祖先元素。
element:可以选择文本,但选择范围受元素边界的约束 */
body,html{
font-family:"Microsoft YaHei",sans-serif,Tahoma,Arial;
/*字体系列:Microsoft YaHei微软雅黑,sans-serif无衬线,Tahoma无衬线字体之大河马字体、Arial无衬线体TrueType字型字体*/
}
article,aside,blockquote,body,button,code,dd,details,div,dl,
dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,
hgroup,hr,input,legend,li,menu,nav,ol,p,pre,section,td,textarea,th,ul{
margin:;
padding:;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box
}
/*
使用了html5标签。IE9一下的浏览器将不支持这些标签元素
比如<header;><article;><footer;><figure;>等等。包含 html5.js 文件将会是这些浏览器明白这些新元素。
*/
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{
display:block
}
input,input[type=button],input[type=reset],input[type=submit]{
resize:none;
border:none;
/*
appearance允许使元素看上去像标准的用户界面元素
appearance: normal常规元素|icon图标(小图片)|window视口|button按钮|menu呈现为一套供用户选择的选项|field呈现为输入字段;
*/
/*
border-radius兼容iPhone的时候会出现和安卓不一样的效果,小圆角变成半圆角
这个时候只需要给该元素添加css ,-webkit-appearance:none;即可解决兼容问题
*/
-webkit-appearance:none;/*解决iPhone圆角问题*/
border-radius:;/*解决iPhone圆角问题*/
}
input,select,textarea{
/*
有的元素不会继承根元素字体大小,所以在移动端开发时常设置如下情况
重设浏览器默认字体大小h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:normal;}
因为假如你设置body{font-size:12px;},但h1是不会继承这个12px,它会按照一定百分比增加字号,
但如果给h1显示指定font-size:100%;它就会继承body设定的字体大小,所以它改变了默认的大小
*/
/* font-size在IE7-设置px不具有继承性,设置%是为了把 font-size 设置为基于父元素的一个百分比值 */
font-size:%
}
table{
/*表格设置合并边框*/
border-collapse:collapse;
/*单元格间隙合并*/
border-spacing:
}
fieldset,img{
border:
}
abbr,acronym{
border:;
/*
设置小型大写字母的字体显示文本,这意味着所有的小写字母均会被转换为大写,
但是所有使用小型大写字体的字母与其余文本相比,其字体尺寸更小。
normal:默认值。浏览器会显示一个标准的字体;
small-caps:浏览器会显示小型大写字母的字体;
inherit:规定应该从父元素继承 font-variant 属性的值
*/
font-variant:normal
}
/*设置删除线*/
del{
text-decoration:line-through
}
address,caption,cite,code,dfn,em,th,var{
/*
font-style 属性定义字体的风格
normal:默认值。浏览器显示一个标准的字体样式。
italic:浏览器会显示一个斜体的字体样式。
oblique:浏览器会显示一个倾斜的字体样式。
inherit:规定应该从父元素继承字体样式
*/
font-style:normal;
font-weight:
}
/*去除列表标记*/
ol,ul{
list-style:none;
} caption,th{
text-align:left/*文字左对齐*/
}
h1,h2,h3,h4,h5,h6{
font-size:%;/*字体100%继承父级*/
font-weight:/*字体加粗*/
}
q:after,q:before{
content:'';/*就是引用,在<q></q>标签之间的文字两头加上引号(")*/ /*<q> 标签定义短的引用。*/
/*如代码:<q>替代文字替代文字替代文字替代文字</q>*/
/*效果为:"替代文字替代文字替代文字替代文字"*/ /*拓展*/
/*<q> 标签在本质上与 <blockquote> 是一样的。不同之处在于它们的显示和应用。
<q> 标签用于简短的行内引用。
如果需要从周围内容分离出来比较长的部分(通常显示为缩进的块),请使用 <blockquote> 标签。*/
} /*sub标签可定义下标文本,sup标签可定义上标文本。*/ /*提示:
无论是 <sub> 标签还是和它对应的 <sup> 标签,在数学等式、科学符号和化学公式中都非常有用。
<sup> 标签在向文档添加脚注以及表示方程式中的指数值时非常有用。
如果和 <a> 标签结合起来使用,就可以创建出很好的超链接脚注。
*/
sub,sup{
font-size:%;/*字体75%继承父级*/
line-height:;/*行高为0*/
position:relative;/*绝对定位*/
vertical-align:baseline;/*设置元素的垂直对齐方式。----默认值:baseline*/
}
sup{
top:-.5em;
}
sub{
bottom:-.25em;
}
a:hover{
text-decoration:underline;/*划过a链接出现下划线*/
}
a,ins{
/*<ins>标签定义已经被插入文档中的文本。*/
text-decoration:none;/*删除下划线*/
}
a:active,a:hover,a:link,a:visited{
/*active:鼠标按下还未释放时的样子*/
/*hover:鼠标经过时的链接效果*/
/*link:未访问的链接*/
/*visited:已访问的链接*/
background: ;/*默认值*/
-webkit-tap-highlight-color:transparent;
/*这个属性只用于iOS (iPhone和iPad)。当你点击一个链接或者通过Javascript定义的可点击元素的时候,
它就会出现一个半透明的灰色背景。要重设这个表现,你可以设置-webkit-tap-highlight-color为任何颜色。
想要禁用这个高亮,设置颜色的alpha值为0即可。*/
-webkit-tap-highlight-color:transparent; outline:;
/*outline (轮廓)是绘制于元素周围的一条线,位于边框边缘的外围,可起到突出元素的作用。*/ text-decoration:none;/*删除下划线*/
}
.
reset.css文件下载及剖析的更多相关文章
- 谈谈一些有趣的CSS题目(十一)-- reset.css 知多少?
开本系列,谈谈一些有趣的 CSS 题目,题目类型天马行空,想到什么说什么,不仅为了拓宽一下解决问题的思路,更涉及一些容易忽视的 CSS 细节. 解题不考虑兼容性,题目天马行空,想到什么说什么,如果解题 ...
- reset.css css重置公共样式
@charset "utf-8";/*Css Document*/ /*! * @名称:reset.css * @功能:1.重设浏览器默认样式 * 2.设置通用原子类 *//* 防 ...
- 1.reset.css的设置
/* reset css */ *, ::before, ::after{ /*选择所有的标签 */ margin: 0; padding: 0; /*清除移动端默认的 点击高亮效果*/ -webki ...
- 关于reset.css的疑问:为什么一定要重置浏览器样式?
自开始做前端算起,我所做过的每一个项目中都会有一个reset.css,也就是重置样式表.我现在想想都不知道第一次是从哪儿弄来的一个重置样式表.快五年了,好像从来都没有质疑过关于重置样式表的内容. 这样 ...
- Reset CSS:只选对的,不选"贵"的
玉伯和正淳一起整理的一份 reset.css: /* KISSY CSS Reset 理念:清除和重置是紧密不可分的 特色:1.适应中文 2.基于最新主流浏览器 维护:玉伯(lifesinger@gm ...
- Normalize.css 与 reset.css
Normalize.css 与 reset.css都是初始化页面样式 不同点在于 reset.css更加粗暴,直接把所有的样式全部初始化了: Normalize.css还剩点良心,还保留了一些浏览器默 ...
- YUI Reset CSS (学习摘抄)
正在使用CSS的你,用过CSS Reset吗?当然,或许你用了,却不知道正在用,比如你可能用到: *{ margin: 0; border: 0; padding: 0; } 这 ...
- 打造自己的reset.css
http://shawphy.com/2009/03/my-own-reset-css.html 最近我对此观点有所新的看法,可以查看<真的还需要reset.css么?> 0,引言 每每有 ...
- 移动端(处理边距样式)reset.css
移动端reset.css,来自张鑫旭网站的推荐,下载地址:https://huruqing.gitee.io/demos/source/reset.css 代码 /* html5doctor.com ...
随机推荐
- python对图片批量命名
深度学习中经常会有批量对图片进行重命名,从网上看到的资料整理一下,方便以后查看. import os class BatchRename(): ''' 批量重命名文件夹中的图片文件 ''' def _ ...
- OCR识别的Android端实现
1.OCR简介OCR (Optical Character Recognition,光学字符识别)是指电子设备(例如扫描仪或数码相机)检查纸上打印的字符,通过检测暗.亮的模式确定其形状,然后用字符识别 ...
- python 散点图上给每个点打标签方便看到数据
import numpy as np import matplotlib.pyplot as plt x=[2.3,4.5,3,7,6.5,4,5.3] y=[5,4,7,5,5.3,5.5,6.2] ...
- IO流——字节流
文件输出流 FileOutputStream:文件输出流是用于将数据写入 File,每次运行,都会覆盖之前文件中的数据 FileOutputStream(File file):创建一个向指定 File ...
- Python3+syslog使用及相关说明
一.说明 1.1 背景说明 syslog这个东西,最早接触是在Z公司做基线安全加固的时候有启用远程日志服务器一项,然后当时还写整理了一篇“rsyslog+loganalyzer远程日志系统搭建教程(C ...
- SQL系列(三)—— 注释(comment)
SQL语句是由DBMS处理的指令.如果你希望包括不进行处理和执行的文本,该怎么办呢?为什么你想要这么做呢?原因有以下几 点. 我们这里使用的SQL语句都很短,也很简单.然而,随着你的SQL语句变长,复 ...
- - XML 解析 总结 DOM SAX PULL MD
目录 目录 XML 解析 总结 DOM SAX PULL MD 几种解析方式简介 要解析的内容 DOM 解析 代码 输出 SAX 解析 代码 输出 JDOM 解析 代码 输出 DOM4J 解析 代码 ...
- java面向对象的基本概念
面向对象的基本概念 这里先介绍面向对象程序设计的一些关键概念,并开始使用类,你需要学习一些术语,我们尽量用比较浅显的语言来介绍,因为这些内容都比较重要,所以希望大家好好好理解. 一.什么是对象和面向对 ...
- C# Modbus 数据读取 使用NModBus4库
ModBus通讯协议 方法名 作用 所需参数 返回值 对应功能码 ReadCoils 读取DO的状态 从站地址(8位) byte slaveAddress 起始地址(16位) ushort start ...
- jsGrid使用入门
jsGrid使用入门 原创蓝天上的一朵云 本文链接:https://blog.csdn.net/u012846041/article/details/82735811 jsGrid资源地址: http ...