大部分网站均有的区块给出一个命名规范
Page container 页面容器 #container
Branding areas 标记(logo)区域 #branding(不要用#header)
Navigation(main) 主导航 #nav_main
Navigation(sub) 副导航 #nav_sub
Navigation(supplementary)支持导航 #nav_supp
Search input 搜索输入框 #search_input
Main content 主要内容 #content_main
Addintional content 附加内容 #content_sub(不要用#sidebar)
Supplementary content补充内容 #content_supp
Site information站点信息 #site_info(不要用#footer)
针对IE的CSS hack 全面 实用
.all IE{property:value\9;}
.gte IE 8{property:value\0;}
.lte IE 7{*property:value;}
.IE 8/9{property:value\0;}
.IE 9{property:value\9\0;}
.IE 7{+property:value;}
.IE 6{_property:value;}
.not IE{property//:value;}lte:就是Less than or equal to的简写,也就是小于或等于的意思。
解决Button自适应宽度的最佳办法
width:auto;overflow:visible;
不能点右键,不用CTRL+A,不能复制作!
<body oncontextmenu=”window.event.returnValue=false” onkeypress=”window.event.returnValue=false” onkeydown=”window.event.returnValue=false” onkeyup=”window.event.returnValue=false” ondragstart=”window.event.returnValue=false” onselectstart=”event.returnValue=false”> </body>
框让连接获得焦点产生的虚线框不会随行高变化:
a {vertical-align:middle;}