常用的css初始化

/*css定义超链接四个状态也有顺序的。*/

a:link, a:visited {

text-decoration: none;

color: #1F376D;

}

a:hover, a:active {

text-decoration: underline;

color: #BD0A01;

border: none;

}

/*以上语句分别定义了"链接、已访问过的链接、鼠标停在上方时、点下鼠标时"的样式。

注意,必须按以上顺序写,否则显示可能和你预想的不一样。记住它们的顺序是“LVHA”。*/

/***********CSS初始化示例代码************/

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:0; padding:0; }

body { background:#fff; color:#555; font-size:14px; font-family: Verdana, Arial, Helvetica, sans-serif; }

td,th,caption { font-size:14px; }

h1, h2, h3, h4, h5, h6 { font-weight:normal; font-size:100%; }

address, caption, cite, code, dfn, em, strong, th, var { font-style:normal; font-weight:normal;}

a { color:#555; text-decoration:none; }

a:hover { text-decoration:underline; }

img { border:none; }

ol,ul,li { list-style:none; }

input, textarea, select, button { font:14px Verdana,Helvetica,Arial,sans-serif; }

table { border-collapse:collapse; }

html {overflow-y: scroll;}

.clearfix:after {content: "."; display: block; height:0; clear:both; visibility: hidden;}

.clearfix { *zoom:1; }

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1、垂直对齐 如果你用CSS,则你会有困惑:我该怎么垂直对齐容器中的元素?现在,利用CSS3的Transform,...
    kiddings阅读 3,208评论 0 11
  • 学习CSS的最佳网站没有之一 http://www.w3school.com.cn/tags/index.asp ...
    Amyyy_阅读 1,101评论 0 1
  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 13,816评论 1 92
  • 从小到大,我一直是一个活的很纠结的人。纠结于一件事情是否做的完美,纠结于说出去的话对方是否有了无限种想法,...
    紫色气球阅读 546评论 0 0
  • Kevin Carter 1993 This is my most successful image after ...
    思践于人阅读 217评论 0 0