资讯专栏INFORMATION COLUMN

css-reset 代码

Rainie / 295人阅读

摘要:最常用黑体宋体黑体宋体公共类雅虎代码初始化黑体宋体黑体宋体公共类腾讯官网样式初始化宋体新浪官网样式初始化宋体淘宝官网样式初始化网易官网样式初始化

最常用
* {
  -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: 0;
    padding: 0;
}
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: 0;
    clear: both;
    visibility: hidden;
}
.clearfix {
    *zoom: 1;
}

/*公共类*/
.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:0; padding:0; }
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:0; clear:both; visibility: hidden;}
.clearfix { *zoom:1; }/*公共类*/
.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:0;padding:0}
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:0;vertical-align:middle}
table{border-collapse:collapse;border-spacing:0}
p{word-wrap:break-word}
新浪官网样式初始化:
body,ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,div{margin:0;padding:0;border:0;}
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:0; padding:0; }
body, button, input, select, textarea { font:12px/1.5tahoma, arial, 5b8b4f53; }
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:0; }
button, input, select, textarea { font-size:100%; }
table { border-collapse:collapse; border-spacing:0; }
网易官网样式初始化:
html {overflow-y:scroll;}
body {margin:0; padding:29px00; font:12px"5B8B4F53",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:0; margin:0;}
table,td,tr,th{font-size:12px;}
li{list-style-type:none;}
img{vertical-align:top;border:0;}
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;}

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/112004.html

相关文章

  • Java代码执行顺序

    摘要:没有关键字修饰的如实例变量非静态变量非静态代码块初始化实际上是会被提取到类的构造器中被执行的,但是会比类构造器中的代码块优先执行到,非静态实例变量非静态代码块的地位是相等的,它们将按顺序被执行。 阅读原文:Java代码执行顺序 程序中代码执行的顺序非常重要,稍有不慎便会是程序运行出错,那么我将结合实例来分析代码中的执行。 名词解释 首先了解几个名词: 非静态代码块 直接由 { } 包起...

    hosition 评论0 收藏0
  • 6.java 代码

    摘要:构造块优先于构造函数执行,如果存在多个构造代码块,则执行顺序按照定义的顺序依次执行。静态代码块在中使用关键字声明的代码块。同步代码块需要写在方法中。 代码块 在java中用{}括起来的称为代码块,代码块可分为以下四种: 普通代码块 构造代码块 静态代码块 同步代码块 普通代码块 在方法或语句中出现的{}就称为普通代码块。普通代码块和一般语句的执行顺序由他们在代码中出现的次序决定,先...

    tuantuan 评论0 收藏0
  • 作为开发人员,这四类Code Review方法你都知道吗?

    摘要:类型瞬时的代码审查第一种类型是瞬时代码审查,它发生在结对编程的情景中。相同的专业水平考虑进行结对编程的另一个重要方面,是一起工作时,两个开发者的专业水平。让一个初级开发者和一个高级开发者进行结对编程,效果并不好。 本文翻译自:https://dzone.com/articles/4-... 转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 没...

    姘搁『 评论0 收藏0
  • 开源许可证分类

    摘要:许可证第三条第款中允许被许可人将经过许可证获得的源代码同自己其他类型的代码混合得到自己的软件程序。 引言 最近研究一些软件源码,然后分支自行维护的时候,开始研究各种开源许可证之间的区别,网上搜索了一些资料,特在此分享记录。 一张图区分GPL、BSD、MIT、Mozilla、Apache和LGPL之间的区别 首先借用阮一峰大大的一张相当直观清晰的图来划分各种协议:开源许可证GPL、BSD...

    walterrwu 评论0 收藏0
  • 开源许可证分类

    摘要:许可证第三条第款中允许被许可人将经过许可证获得的源代码同自己其他类型的代码混合得到自己的软件程序。 引言 最近研究一些软件源码,然后分支自行维护的时候,开始研究各种开源许可证之间的区别,网上搜索了一些资料,特在此分享记录。 一张图区分GPL、BSD、MIT、Mozilla、Apache和LGPL之间的区别 首先借用阮一峰大大的一张相当直观清晰的图来划分各种协议:开源许可证GPL、BSD...

    王军 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<