级联样式文件共通样式整理

通过多个项目整合的CSS文件通用样式,相关注释仅供参考:

View Code
 1 /*<pre>:定义预格式化文本;<code>:用于表示计算机源代码的文本内容;
2 *<fieldset>:可将表单内相关的元素分组;<legend>:为fieldset标签定义标题;
3 *<blockquote>:块应用,会自动增加换行以及外边距。
4 *对以下元素去除预定样式的外边距和内边距
5 */
6 body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form,
7 fieldset, legend, input, button, textarea, p, blockquote, th, td {margin: 0; padding: 0;}
8
9 /*<abbr>:对缩写词语进行标记;<acronym>:对首字母缩写进行标记。
10 *对以下元素清除边框样式*/
11 fieldset, img {border: 0;}
12 abbr, acronym{border: 0;font-variant: normal;}
13
14 /*元素获取焦点时的虚线框*/
15 :focus{outline: 0;}
16
17 /*<address>:可以定义一个地址,通常内容为斜体;<caption>:定义表格的标题,必须紧跟在<table>标签之后,且只有一个;
18 *<cite>、<dfn>、<var>短语元素,呈现特殊样式;<optgroup>:通常与<select>下拉框联合使用,表示分组选择项的类别名,通常内容为斜体。
19 *对以下元素字体样式进行设置
20 */
21 address, caption, cite, code, dfn, th, var, optgroup {font-style: normal;font-weight: normal;}
22 h1, h2, h3, h4, h5, h6 {font-size: 100%;font-weight: normal;}
23 input, button, textarea, select, optgroup, option {font-family: inherit; font-size: inherit; font-style: inherit; font-weight: inherit;}
24 input, button, textarea, select {*font-size: 100%;}
25
26 /*清楚列表样式*/
27 ol, ul {list-style: none;}
28
29 /*border-collapse:定义表格行和列边框是合并成单边框还是分别有各自的边框,值为:separate|collapse
30 *border-spacing:定义相邻单元格边框之间的距离,此时必须为【边框分离模式即separate】
31 *将表格边框合并
32 */
33 table {border-collapse: collapse;border-spacing: 0;}
34
35 caption, th {text-align: left;}
36 sup, sub {font-size: 100%;vertical-align: baseline;}
37 ins {text-decoration: none;}
38 del {text-decoration: line-through;}
39
40 /*不产生任何引号*/
41 blockquote, q{quotes: none;}
42 blockquote:before, blockquote:after, q:before, q:after {content: '';content: none;}
43
44 /*去除链接内容的下滑线;鼠标为手型;消除点击链接时产生的虚线框*/
45 a{ text-decoration:none; cursor:pointer;blr:expression(this.onFocus=this.blur())}
46
47 /*Body一般通用样式*/
48 body{
49 font-size:12px;
50 font-family:"宋体", "黑体", Verdana, Arial;
51 color: #4d4d4d;
52 background-color:#ffffff;
53 line-height: 22px;
54 }

--------------------------------------------欢迎大家指摘,更多的需要大家补充和完善---------------------------------------------------------------

posted @ 2011-10-18 12:31  WILLPAN  阅读(384)  评论(0编辑  收藏  举报