30 2008

div+css常用到的全局css定义

Published by at 09:43 under CSS,Web技术

每一个用css控制的网站,都需要有一个默认的全局定义的css样式,今天写了一份,以后作为默认的使用,具体细节需要略微调整,这样可以省很多事。

具体代码如下:

body { font-family:”宋体”; margin:0; padding:0; background: #FFFFFF; font-size:12px; color:#000000;}
a:link {color: #000099; text-decoration:none;}
a:visited { color: #000099; text-decoration:none;}
a:hover{ color:#FF0000;text-decoration:underline;}
div,form,img,ul,ol,li,dl,dt,dd,p { margin: 0; padding: 0; border: 0;}
li{ list-style:none;}
h1,h2,h3,h4,h5,h6,input { margin:0; padding:0;}
table,td,tr,th{ font-size:12px;}
h2{ font-family:”宋体”; font-size:12px; color: #1e629e; line-height:24px; text-decoration:none;}
h2 a:link{ color:#c00505; text-decoration:underline;}
h2 a:visited{ color:#c00505; text-decoration:underline;}
h2 a:hover{ color:#540808; text-decoration:none;}

h3{ line-height:20px; font-size:14px;}
h4{font-family:”宋体”; font-size:14px; color: #266591; font-weight:bolder; padding-left:6px; padding-top:6px;}
.spaceline{clear:both; line-height:5px; height:5px; margin:0 auto}

.clear{ clear: both; font-size:1px; width:1px; visibility: hidden; }
#width{width:950px;margin:3px auto 0 auto;padding:0;text-align:left;}
#width950{width:950px;margin:3px auto 0 auto;padding:0;text-align:left;}

其中的各种颜色需要根据网站的整体色调调整,其他部分也有些细节调整。

No responses yet

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.