先写全局的样式

body { margin:0 auto; font-size:12px; font-family:Verdana; line-height:1.5;}
ul,dl,dd,h1,h2,h3,h4,h5,h6,form,p { padding:; margin:;}
ul { list-style:none;}
img { border:0px;}
a { color:#05a; text-decoration:none;}
a:hover { color:#f00;}

全局的样式定义完后,下面定义以上几大块的样式,先设置下#containerr的样式如下:

#container { width:900px; margin:0 auto;}
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:; padding:; }
fieldset, img { border:; }
:focus { outline:; }
h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }
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%;}
textarea { overflow:auto; }
body { line-height: 1.5; }
ol, ul { list-style: none; }
:link, :visited, ins { text-decoration: none; }
body {
font: 14px/1.5 "Microsoft Yahei", "Hiragino Sans GB", Helvetica, "Helvetica Neue", "微软雅黑", Tahoma, Arial, sans-serif;
color: #14191e;
}

a链接样式

a:link {color: #FF0000} /* 未访问的链接 */
a:visited {color: #00FF00} /* 已访问的链接 */
a:hover {color: #FF00FF} /* 鼠标移动到链接上 */
a:active {color: #0000FF} /* 选定的链接 */
a { display: block; height: 30px; width: 100px; line-height: 30px; text-align: center; background: #CCC; }

a:hover { color: #FFF; text-decoration: none; background: #333; }

css 默认的更多相关文章

  1. Normalize.css:优化重置CSS默认属性

    Normalize.css:优化重置CSS默认属性 官方网站:http://necolas.github.io/normalize.css/ 项目仓库:https://github.com/necol ...

  2. web 开发 css 默认值列表

    css默认值列表 HTML标签CSS属性默认值汇总 这个东西,在你需要还原默认值的时候,比较有用. 开始的时候 *{margin:0;padding:0;},当需要使用边距的时候,就需要还原HTML默 ...

  3. css默认值汇总

    原文:http://www.cnblogs.com/xiangzi888/archive/2011/10/12/2209514.html HTML标签CSS属性默认值汇总 这个东西,在你需要还原默认值 ...

  4. HTML标签CSS默认值研究

    最近写css的时候,发现在div元素里面添加ul元素后发现,ul列表在div里面距离最上方总是有一段空行,当时很奇怪,以为是哪个css出了问题,就把css去掉了,发现问题依旧,然后就查了一下发现htm ...

  5. css默认被后代inherite的属性列表

    css中的属性大部分都可以被继承,但是也有众多不能被继承,比如display, position,,left,right,top,bottom,float,width,border-color,bor ...

  6. 前端学习 -- Css -- 默认样式

    浏览器为了在页面中没有样式时,也可以有一个比较好的显示效果, 所以为很多的元素都设置了一些默认的margin和padding,而它的这些默认样式,正常情况下我们是不需要使用的. 所以我们往往在编写样式 ...

  7. css默认样式

    html, address,blockquote,body, dd, div,dl, dt, fieldset, form,frame, frameset,h1, h2, h3, h4,h5, h6, ...

  8. CSS默认可继承样式

    前面的话 一直想总结出一份可继承样式的列表.常听说,颜色和字体是可继承的,盒模型样式是不可继承的,但其他样式呢?本文内容包括所有可继承的样式 [注意]关于样式的详细信息移步至此 常用可继承样式 col ...

  9. css 默认样式

    body,textarea,input,select,option {font-size:12px;color:#333;font-family:Tahoma,Arial,sans-serif;} h ...

随机推荐

  1. myeclipse 清理项目缓存的几大步骤

    http://blog.csdn.net/moneyshi/article/details/49247169 相信大家被项目缓存折腾过吧,这里罗列几条清除项目缓存的方法 1.项目清理: 选择菜单栏的P ...

  2. Tomcat发布网站知识集锦

    修改端口.修改默认发布目录.多域名绑定 一.修改发布端口号为80(Tomcat默认为8080) 打开配置文件(我的如下:E:\J2EEServer\Tomcat 6.0\conf\server.xml ...

  3. CSS table-layout 、border-collapse属性

    ( table-layout)设置表格布局算法: 可能的值 值 描述 automatic 默认.列宽度由单元格内容设定. fixed 列宽由表格宽度和列宽度设定. inherit 规定应该从父元素继承 ...

  4. Codeforces Round #374 (Div. 2) A B C D 水 模拟 dp+dfs 优先队列

    A. One-dimensional Japanese Crossword time limit per test 1 second memory limit per test 256 megabyt ...

  5. Lumia刷机Win10 Mobile 10.0.10166惊魂记

    1 手贱,不愿等正式版正式发布,结果手动更新了,为此还熬了两个晚上. 2 第一次撞上去,没有无线了,倒.一开始还以为是预览版BUG,后来查了下重置就可以了,可以没有3G,没有WIFI也没办法备份,干, ...

  6. 基础套接字的C#网络编程

    1.基于socket创建套接字网络连接服务端1.初始化 步骤 操作 方法 操作类 1. 创建ip ipaddress IPAddress类 2. 创建ip终结点   ipendpoint IpendP ...

  7. makefile--模式规则(七)

    原创博文,转载请标明出处--周学伟http://www.cnblogs.com/zxouxuewei/ 上一节讲到目录创建成功,目标文件没有生产到对应目录下,这里我们先给目标文件加上对应目录,这样的话 ...

  8. POJ2112 Optimal Milking (网络流)(Dinic)

                                             Optimal Milking Time Limit: 2000MS   Memory Limit: 30000K T ...

  9. HDU-5785 Interesting(Manacher算法+区间处理)

    题目大意:给一个字符串,求所有相邻两回文子串的外侧下标之积的和 题目分析:另L[i]为所有以 i 为右端点的回文字串的左端点之和,同理,另R[i]表示所有以 i 为左端点的回文子串的右端点之和.显然, ...

  10. ed编辑器使用

    evilxr@IdeaPad:/tmp$ ed aa.c 0 a enter another words hello nice www.evilxr.com . w aa.c 46 q a 表示添加内 ...