先写全局的样式

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. 1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost

    报错:1130-host ... is not allowed to connect to this MySql server 解决方法: 1. 改表法. 可能是你的帐号不允许从远程登陆,只能在loc ...

  2. sql语句 优化技巧

    1.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索引而进行全表扫描. 2.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉 ...

  3. 使用isInEditMode解决可视化编辑器无法识别自定义控件的问题

    如果在自定义控件的构造函数或者其他绘制相关地方使用系统依赖的代码, 会导致可视化编辑器无法报错并提示:Use View.isInEditMode() in your custom views to s ...

  4. JavaScript学习记录总结(九)——移动添加效果

    <!DOCTYPE html><html><head><title>moveOption.html</title> <meta nam ...

  5. 用类求圆面积c++

    #include<iostream>.#include<math.h>using namespace std;class Circle{    public:        d ...

  6. kuangbin_ShortPath I (POJ 2240)

    本身很简单的spfa判环 TLE了一把是因为没写map(不会) 看着别人的答案临时学了一发发现只是用的话还是挺简单的 (但是绝对别学别人直接命名为m) 800多MS水过 噢对了这题Pending到超时 ...

  7. liunx之:wps for liunx的安装经验

    首先是下载正确的安装包 WPS For Linux : 社区下载:http://community.wps.cn/download/ 社区最新包下载:http://wps-community.org/ ...

  8. 常见半监督方法 (SSL) 代码总结

    经典以及最新的半监督方法 (SSL) 代码总结 最近因为做实验需要,收集了一些半监督方法的代码,列出了一个清单: 1. NIPS 2015 Semi-Supervised Learning with ...

  9. http cookies

    https://msdn.microsoft.com/en-us/library/ms178194.aspx?f=255&MSPPError=-2147217396 http://www.as ...

  10. ROM、RAM、DRAM、SRAM和FLASH区别

    ROM和RAM指的都是半导体存储器,ROM是Read Only Memory的缩写,RAM是Random Access Memory的缩写. ROM在系统停止供电的时候仍然可以保持数据,而RAM通常都 ...