css-reset 代码
最常用
- * {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- *:before,
- *:after {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td {
- margin:;
- padding:;
- }
- body {
- background: #fff;
- color: #555;
- font-size: 14px;
- font-family: "Arial", "Microsoft YaHei", "黑体", "宋体", sans-serif;
- }
- td, th, caption {
- font-size: 14px;
- }
- h1, h2, h3, h4, h5, h6 {
- font-weight: normal;
- font-size: 100%;
- }
- address, caption, cite, code, dfn, em, strong, th, var {
- font-style: normal;
- font-weight: normal;
- }
- a {
- color: #555;
- text-decoration: none;
- }
- a:hover {
- text-decoration: underline;
- }
- img {
- border: none;
- vertical-align: middle;
- }
- ol, ul, li {
- list-style: none;
- }
- input, textarea, select, button {
- font: 14px "Arial", "Microsoft YaHei", "黑体", "宋体", sans-serif;
- }
- table {
- border-collapse: collapse;
- }
- html {
- overflow-y: scroll;
- }
- .clearfix:before,
- .clearfix:after {
- content: " ";
- display: inline-block;
- height:;
- clear: both;
- visibility: hidden;
- }
- .clearfix {
- *zoom:;
- }
- /*公共类*/
- .fl {
- float: left
- }
- .fr {
- float: right
- }
- .al {
- text-align: left
- }
- .ac {
- text-align: center
- }
- .ar {
- text-align: right
- }
- .hide {
- display: none
- }
雅虎代码初始化
- body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { margin:; padding:; }
- body { background:#fff; color:#555; font-size:14px; font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif; }
- td,th,caption { font-size:14px; }
- h1, h2, h3, h4, h5, h6 { font-weight:normal; font-size:100%; }
- address, caption, cite, code, dfn, em, strong, th, var { font-style:normal; font-weight:normal;}
- a { color:#555; text-decoration:none; }
- a:hover { text-decoration:underline; }
- img { border:none; }
- ol,ul,li { list-style:none; }
- input, textarea, select, button { font:14px "Arial","Microsoft YaHei","黑体","宋体",sans-serif; }
- table { border-collapse:collapse; }
- html {overflow-y: scroll;}
- .clearfix:after {content: "."; display: block; height:; clear:both; visibility: hidden;}
- .clearfix { *zoom:; }/*公共类*/
- .fl { float:left}
- .fr {float:right}
- .al {text-align:left}
- .ac {text-align:center}
- .ar {text-align:right}
- .hide {display:none}
腾讯QQ官网样式初始化
- body,ol,ul,h1,h2,h3,h4,h5,h6,p,th,td,dl,dd,form,fieldset,legend,input,textarea,select{margin:;padding:}
- body{font:12px"宋体","Arial Narrow",HELVETICA;background:#fff;-webkit-text-size-adjust:100%;}
- a{color:#2d374b;text-decoration:none}
- a:hover{color:#cd0200;text-decoration:underline}
- em{font-style:normal}
- li{list-style:none}
- img{border:;vertical-align:middle}
- table{border-collapse:collapse;border-spacing:}
- p{word-wrap:break-word}
新浪官网样式初始化
- body,ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,div{margin:;padding:;border:;}
- body{background:#fff;color:#333;font-size:12px; margin-top:5px;font-family:"SimSun","宋体","Arial Narrow";}
- ul,ol{list-style-type:none;}
- select,input,img,select{vertical-align:middle;}
- a{text-decoration:none;}
- a:link{color:#009;}
- a:visited{color:#800080;}
- a:hover,a:active,a:focus{color:#c00;text-decoration:underline;}
淘宝官网样式初始化
- body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { margin:; padding:; }
- body, button, input, select, textarea { font:12px/1.5tahoma, arial, \5b8b\4f53; }
- h1, h2, h3, h4, h5, h6{ font-size:100%; }
- address, cite, dfn, em, var { font-style:normal; }
- code, kbd, pre, samp { font-family:couriernew, courier, monospace; }
- small{ font-size:12px; }
- ul, ol { list-style:none; }
- a { text-decoration:none; }
- a:hover { text-decoration:underline; }
- sup { vertical-align:text-top; }
- sub{ vertical-align:text-bottom; }
- legend { color:#000; }
- fieldset, img { border:; }
- button, input, select, textarea { font-size:100%; }
- table { border-collapse:collapse; border-spacing:; }
网易官网样式初始化
- html {overflow-y:scroll;}
- body {margin:; padding:29px00; font:12px"\5B8B\4F53",sans-serif;background:#ffffff;}
- div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,blockquote,p{padding:; margin:;}
- table,td,tr,th{font-size:12px;}
- li{list-style-type:none;}
- img{vertical-align:top;border:;}
- ol,ul {list-style:none;}
- h1,h2,h3,h4,h5,h6{font-size:12px; font-weight:normal;}
- address,cite,code,em,th {font-weight:normal; font-style:normal;}
css-reset 代码的更多相关文章
- HTML常用命名和CSS reset代码【收集总结】
CSS命名规则 头:header 内容:content/containe 尾:footer 导航:nav 侧栏:sidebar 栏目:column 页面外围控制整体布局宽度:wrapper 左右中:l ...
- 一些大厂的css reset 代码
不同的浏览器对标签的默认值不同,为了避免页面出现浏览器差异,所以要初始化样式表属性.使用通配符*并不可取,因为会遍历到每一个标签,大型网页会加载过慢,影响性能. 雅虎工程师提供的CSS初始化示例代码: ...
- 经典的css reset代码 (reset.css)
<style> html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, ...
- CSS reset的审视
by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=758 一.CSS re ...
- CSS Reset(CSS重置)
CSS Reset是指重设浏览器的样式.在各种浏览器中,都会对CSS的选择器默认一些数值,譬如当h1没有被设置数值时,显示一定大小. 但并不是所有的浏览器都使用一样的数值,所以有了CSS Reset, ...
- 一天搞定CSS: 标签样式初始化(CSS reset)及淘宝样式初始化代码--09
样式初始化:是指对HTML中某些标签的默认样式进行清除 样式初始化目的: 不同浏览器的默认样式不一样,若不清理,会导致相同的代码在浏览器中解析结果不一样,为了避免这种情况,所以需要进行样式初始化. 代 ...
- 由css reset想到的深入理解margin及em的含义
由css reset想到的深入理解margin及em的含义 原文地址:http://www.ymblog.net/content_189.html 经常看到这样语句,*{ margin:0px;pad ...
- css初始化代码
最近老有新项目开发,一直在找存留的CSS初始化代码,索性放到这里备份下, @charset "utf-8"; /* -------------------------------- ...
- ife任务刷题总结(一)-css reset与清除浮动
本文同时发布于本人的个人网站www.yaoxiaowen.com 百度创办的前端技术学院,是一个面向大学生的前端技术学习平台.虽然只有大学生才有资格报名,提交代码进行比赛排名.但是这并不妨碍我们这些初 ...
- 常见标签的默认属性值及相互作用——关于CSS reset的思考
在现在的网站设计中使用reset.css用重置整个站点的标签的CSS属性的做法很常见,但有时候我们已经为了reset而reset,我们经常看到这样的reset代码 div{ padding:0px; ...
随机推荐
- ThreadLocal源码解读
1. 背景 ThreadLocal源码解读,网上面早已经泛滥了,大多比较浅,甚至有的连基本原理都说的很有问题,包括百度搜索出来的第一篇高访问量博文,说ThreadLocal内部有个map,键为线程对象 ...
- JS去除掉字符串前后空格
1. 推荐使用jquery已封装好的方法,非常简单 $.trim(str) jquery的内部实现如下, function trim(str){ return str.replace(/^(\s|\u ...
- kvm虚拟化
1.kvm虚拟化介绍 什么是虚拟化 虚拟化就是通过模拟计算机硬件(cpu,内存,硬盘,网卡)来实现在一台物理服务器上运行同时多个不同的操作系统,并且使每个操作系统之间都是互相隔离的 为什么要学习虚拟化 ...
- 说说我心中的Linux系统
我不知道在阅读此篇文章的你,是一个什么样的人,或许你只是偶然看到此篇文章的路人,或许是对linux有兴趣但没接触过linux的圈外人,或许是已经入行没多久的菜鸟,或许是喜欢linux却学习不下去预备放 ...
- maven依赖scope配置项讲解(转)
原文:https://blog.csdn.net/lisongjia123/article/details/56299006 <scope>的分类一.complie编译域,这个是Maven ...
- Python Scrapy反爬虫常见解决方案(包含5种方法)
爬虫的本质就是“抓取”第二方网站中有价值的数据,因此,每个网站都会或多或少地采用一些反爬虫技术来防范爬虫.比如前面介绍的通过 User-Agent 请求头验证是否为浏览器.使用 JavaScript ...
- mysql union 与 union all 语法及用法
1.mysql union 语法 mysql union 用于把来自多个select 语句的结果组合到一个结果集合中.语法为: select column,......from tabl ...
- React Native动画总结
最近在使用react native进行App混合开发,相对于H5的开发,RN所提供的样式表较少,RN中不能使用类似于css3中的动画,因此,RN提供了Animated的API 1.写一个最简单的动画 ...
- 【python 字符串】 字符串的相关方法(二)
查找元素所在的第一个的索引位置 text.find() 可有开始和结束位置查找 find('ex',3,6) # 查找元素的索引位置 text = 'alexalex' ret = text. ...
- codeforces342B
Xenia and Spies CodeForces - 342B Xenia the vigorous detective faced n (n ≥ 2) foreign spies lined u ...