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


CSS 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, precode, 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-variantnormal;}   
  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-stylenormal;font-weightnormal;}   
  22. h1, h2, h3, h4, h5, h6 {font-size: 100%;font-weightnormal;}   
  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-stylenone;}   
  28.   
  29. /*border-collapse:定义表格行和列边框是合并成单边框还是分别有各自的边框,值为:separate|collapse  
  30. *border-spacing:定义相邻单元格边框之间的距离,此时必须为【边框分离模式即separate】  
  31. *将表格边框合并  
  32. */  
  33. table {border-collapsecollapse;border-spacing: 0;}   
  34.   
  35. caption, th {text-alignleft;}   
  36. sup, sub {font-size: 100%;vertical-alignbaselinebaseline;}   
  37. ins {text-decorationnone;}   
  38. del {text-decorationline-through;}   
  39.   
  40. /*不产生任何引号*/  
  41. blockquote, q{quotesnone;}   
  42. blockquote:before, blockquote:after, q:before, q:after {content'';contentnone;}   
  43.   
  44. /*去除链接内容的下滑线;鼠标为手型;消除点击链接时产生的虚线框*/  
  45. a{ text-decoration:nonecursor:pointer;blr:expression(this.onFocus=this.blur())}   
  46.   
  47. /*Body一般通用样式*/  
  48. body{   
  49.     font-size:12px;   
  50.     font-family:"宋体""黑体"VerdanaArial;   
  51.     color#4d4d4d;   
  52.     background-color:#ffffff;   
  53.     line-height22px;   
  54. }  


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3