【转】div+css全局样式(各大门户网站以及常用css全局样式)
自己收集的一些css全局样式,有些事不知名网站的css样式在这里拿出来和大家分享一下...
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, font, 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 {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
/* remember to highlight inserts somehow! */
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
}
body{text-align:center;margin: 0; padding: 0; background: url(../images/bg.gif) repeat-x; font-size:12px; font-family: Arial,宋体;color: #585858; line-height:20px;}
div,form,img,ul,ol,li,dl,dt,dd,table,td,tr,th{margin: 0; padding: 0;border:0; overflow:hidden; float:left;}
li{list-style-type:none; }
select,input{ font-size:12px; font-family:Arial,宋体;color: #585858; line-height:20px;}
h1,h2,h3,h4,h5,h6{margin: 0; padding: 0;font-weight: normal;; font-size:12px;}
img{vertical-align:middle; text-align:center;}
/*base styles*/
body{
text-align:center;
font-family:"宋体",arial;
margin:0;
padding:0;
background:#FFF;
font-size:12px;
color:#333;
}
div,form,p,img,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6{
margin:0;
padding:0;
border:0;
}
ul,ol,li {list-style-type:none;}
table,td,tr,th,input,select{font-size:12px;}
input {font-family:Arial;}/*text and password width*/
table{border-collapse:collapse;}
hr {
clear:both;
border-width:0;
border-top:1px solid #ccc;
border-bottom:1px solid #FFF;
height:2px;
overflow:hidden;
}
i {font-size:14px;color:red;font-style:normal;margin:0 5px;}/* * */
/*link*/
a:link {color:#333;text-decoration:none;font-family:arial;}
a:visited {color:#333;text-decoration:none;font-family:arial;}
a:hover {color:#bc2931; text-decoration:underline;font-family:arial;}
a:active {color:#bc2931;}
/*font*/
.f12{font-size:12px;}
.f14{font-size:14px;}
.fb{font-weight:800;}
.fi{font-style:italic;}
.dele{text-decoration:line-through;}
.ful {text-decoration:underline;}
/*Area*/
#head,#nav,#main,#foot {
width:950px;
height:auto;
margin:0 auto;
clear:both;
overflow:hidden;/*
1.网易
body { text-align: center; font-family:"宋体", arial;margin:0; padding:0; background: #FFF; font-size:12px; color:#000;}
div,form,img,ul,ol,li,dl,dt,dd {margin: 0; padding: 0; border: 0; }
li{list-style-type:none;}
img{vertical-align:top;}
h1,h2,h3,h4,h5,h6 { margin:0; padding:0;font-size:12px; font-weight:normal;}
/* Link */
a:link {color: #1f3a87; text-decoration:none;}
a:visited {color: #83006f;text-decoration:none;}
a:hover {color: #bc2931; text-decoration:underline;}
a:active {color: #bc2931;}
2.MSN
body {padding:0;margin:0;text-align:center;color:#666;font-size:12px;font-family:tahoma,arial,sans-serif;}
h1, h2, h3, h4, h5, h6, form, div, p, i, img, ul, li, ol, table, tr, td,th, fieldset, label, legend,button,input { margin:0;padding:0;}
li{list-style:none;}
a img{border:none;}
a:link{text-decoration:none;color:#07519A;}
a:visited{text-decoration:none;color:#07519A;}
a:active,a:hover{text-decoration:underline;color:#07519A;}
3.搜狐
/* 全局CSS定义 */
body{font-family:'宋体';text-align:center;margin:0 auto;padding:0;background:#FFF;font-size:12px;color:#333;}
body > div{text-align:center;margin-right:auto;margin-left:auto;}
div,form,ul,ol,li,span,p{margin:0;padding:0;border:0;}
img,a img{border:0;margin:0;padding:0;}
h1,h2,h3,h4,h5,h6{margin:0;padding:0;font-size:12px;font-weight:normal;}
ul,ol,li{list-style:none}
table,td,input{font-size:12px}
/* 默认链接颜色 */
a{outline-style:none;color:#333;text-decoration:none}
a:hover{color:#c00;text-decoration:underline;}
4.中国制造网
/*M-I-C.home0825*/
body{font-size:75%;padding-bottom:40px;background-color:#fff}/*Base12px*/
#top,#cr,#urh,#footer ul.les{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:91.67%}
#urhC,#lesC,#urh h1,#urhB h1,.qp{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:83.33%;font-weight:normal}
.qp,#fastLink{font-family:Arial,Helvetica,sans-serif;font-size:91.67%;font-weight:normal}
h1,h2,h3,h4,h5,h6,small,big{font-size:100%}
body,h1,h2,h3,h4,h5,h6,form,table{margin:0;border:0}
img{border:0}
body,td,th,select,input,button{font-family:Arial,Helvetica,sans-serif;color:#02032f}
img,select,input,button{vertical-align:middle}
input,textarea,button,select{font-family:inherit;font-weight:normal;font-size:inherit}
em{font-style:normal}
ul,li{margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding:0;list-style:none}
caption{font-weight:bold;text-align:left;border-top-width:0;border-right-width:0;border-left-width:0;padding-bottom:2px}
hr{clear:both;color:#A9BAD3}
a *{cursor:pointer}
a{text-decoration:none}
a:link,#header a:visited,#headC a:visited,#nav a:visited,.urhD a:visited,#fastLink a:visited,#footer a:visited,.search a:visited{color:#0b4a9f}
#se .cont a:visited,#tabCa01ct a:visited,#ca .cont a:visited,#uc .cont a:visited{color:#774B90}
a:link,a:visited,a.mr:visited,#main .mr a:visited,a#showHere:visited{color:#0b4a9f}
#top a:link,#top a:visited{color:#386cb1;margin-left:3px;margin-right:3px}
#top #newMsg a:link,#top #newMsg a:visited{color:#FF7800}
#newMsg img{margin-bottom:2px;>margin-bottom:-2px;}
a:hover,#top a:hover,#header a:hover,#headC a:hover,#nav a:hover,#urh a:hover,.urhD a:hover,#urhC a:hover,#fastLink a:hover,#footer a:hover,.search a:hover{color:#e35b00;text-decoration:underline}
非常感谢Perishable的整理与归纳,以下是由某人翻译
_________________________
Minimalistic Reset [ Version 1 ]
相信这一段你经常看到.而且也是我们经常用到的
padding: 0;
margin: 0;
}
Minimalistic Reset [ Version 2 ]
border:0的设计有些不靠谱了
padding: 0;
margin: 0;
border: 0;
}
Minimalistic Reset [ Version 3 ]
当然这个也是不推荐的.会跟某些默认样式有冲突
outline: 0;
padding: 0;
margin: 0;
border: 0;
}
_________________________
Condensed Universal Reset
这是作者当前比较钟意的一种写法.保证了相对普遍浏览器样式的统一性.
vertical-align: baseline;
font-weight: inherit;
font-family: inherit;
font-style: inherit;
font-size: 100%;
border: 0 none;
outline: 0;
padding: 0;
margin: 0;
}
_________________________
Poor Man’s Reset
其实这也是我们常用的一类Css Reset.对字体的大小复位,以及图片链接的边框处理.
也经常在某些站点看到
padding: 0;
margin: 0;
}
html {
font-size: 1em;
}
body {
font-size: 100%;
}
a img, :link img, :visited img {
border: 0;
}
_________________________
Shaun Inman’s Global Reset
作者认为Shaun写这类的Css Reset是有某种目的性.
而且这类规则是针对的是某些重要的常用浏览器.
比如ie,firefox等
form, fieldset, input, p, blockquote, table, th, td, embed, object {
padding: 0;
margin: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
fieldset, img, abbr {
border: 0;
}
address, caption, cite, code, dfn, em,
h1, h2, h3, h4, h5, h6, strong, th, var {
font-weight: normal;
font-style: normal;
}
ul {
list-style: none;
}
caption, th {
text-align: left;
}
h1, h2, h3, h4, h5, h6 {
font-size: 1.0em;
}
q:before, q:after {
content: '';
}
a, ins {
text-decoration: none;
}
_________________________
Yahoo CSS Reset
yahoo这帮家伙写的Reset觉得可以推荐
padding: 0;
margin: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
fieldset,img {
border: 0;
}
address,caption,cite,code,dfn,em,strong,th,var {
font-weight: normal;
font-style: normal;
}
ol,ul {
list-style: none;
}
caption,th {
text-align: left;
}
h1,h2,h3,h4,h5,h6 {
font-weight: normal;
font-size: 100%;
}
q:before,q:after {
content:'';
}
abbr,acronym { border: 0;
}
_________________________
Erik Meyer’s CSS Reset
作者将Erik Meyer的代码重新整理了.但功能上还是一样的
这套Css Reset是业内是使用最多的
del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var,
h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code,
dl, dt, dd, ol, ul, li, fieldset, form, label, legend {
vertical-align: baseline;
font-family: inherit;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
outline: 0;
padding: 0;
margin: 0;
border: 0;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
body {
background: white;
line-height: 1;
color: black;
}
ol, ul {
list-style: none;
}
/* tables still need cellspacing="0" in the markup */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
font-weight: normal;
text-align: left;
}
/* remove possible quote marks (") from <q> & <blockquote> */
blockquote:before, blockquote:after, q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
_________________________
Condensed Meyer Reset
总的来说这是对Erik Meyer的Css Reset的修改与提升.
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6,
pre, form, fieldset, input, textarea, p, blockquote, th, td {
padding: 0;
margin: 0;
}
fieldset, img {
border: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
ol, ul {
list-style: none;
}
address, caption, cite, code, dfn, em, strong, th, var {
font-weight: normal;
font-style: normal;
}
caption, th {
text-align: left;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
font-size: 100%;
}
q:before, q:after {
content: '';
}
abbr, acronym {
border: 0;
}
浙公网安备 33010602011771号