初使化标签定义
html{color:#000;background:#FFF;}
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;}
table{border-collapse:collapse;border-spacing:0;}
fieldset,img{border:0;}
address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}
del,ins{text-decoration:none;}
li{list-style:none;}
caption,th{text-align:left;}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
q:before,q:after{content:'';}
abbr,acronym{border:0;font-variant:normal;}
sup{vertical-align:baseline;}
sub{vertical-align:baseline;}
legend{color:#000;}
input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}
input,button,textarea,select{*font-size:100%;}
body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}
select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}
table{font-size:inherit;font:100%;}
pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
常用的CSS命名规则
头:header
内容:content/container
尾:footer
导航:nav
侧栏:sidebar
栏目:column
页面外围控制整体布局宽度:wrapper
左右中:left right center
登录条:loginbar
标志:logo
广告:banner
页面主体:main
热点:hot
新闻:news
下载:download
子导航:subnav
菜单:menu
子菜单:submenu
搜索:search
友情链接:friendlink
版权:copyright
滚动:scroll
内容:content
标签页:tab
文章列表:list
提示信息:msg
小技巧:tips
栏目标题:title
加入:joinus
指南:guild
服务:service
注册:regsiter
状态:status
投票:vote
合作伙伴:partner
未知大小的图片在已知容器内水平垂直居中显示
#imgList{width: 650px;margin: 0 auto;}
.box{height:200px;width:200px;border: solid 1px #666;text-align:center; line-height:200px;font-size:12px;float: left;margin-right: 10px; overflow: hidden;}
* html .box{font-size: 180px}
*>html body .box{font-size: 180px;}
*>html body .box img{margin: -35px 0 0;}
img{vertical-align:middle;}-->
刷新页面,广告随机变化
window.onload = function(){var i=Math.floor(Math.random()*5)+1;
document.getElementById("g0"+i).className = '';}
鼠标滑动时触及背景颜色
.on-over{ background:#ccc;}
.on-out{ background:#fff;}
表单输入效果
.input_Gray{border:1px solid #C0C1C6;height:18px;color:#999;width:100px;}
.input_Blue{border:1px solid #598EB9;height:18px;color:#000;width:100px;}