本人經常使用的css reset

來源:互聯網
上載者:User
 1 @charset "utf-8"; 2 /* Css Reset For XHTML*/ 3 html{color:#000;background:#FFF} 4 body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0} 5 table{border-collapse:collapse;border-spacing:0} 6 fieldset,img{border:0} 7 address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal} 8 ol,ul{list-style:none} 9 caption,th{text-align:left}10 h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}11 q:before,q:after{content:''}12 abbr,acronym{border:0;font-variant:normal}13 sup{vertical-align:text-top}14 sub{vertical-align:text-bottom}15 input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}16 input,textarea,select{*font-size:100%}17 legend{color:#000}18 /*去除連結取得焦點時的虛線框*/19 a{text-decoration:none;outline:none;}20 a:hover{text-decoration:underline;}21 a:active{star:expression(this.onFocus=this.blur())/*IE6/7,此代碼會中斷tab,而且過多使用css運算式會嚴重影響頁面效能*/;}22 a:focus{outline:none;}23 /*解決firefox下button文字設定行高沒有垂直置中的問題*/24 button::-moz-focus-inner,input[type="reset"]::-moz-focus-inner,input[type="button"]::-moz-focus-inner,input[type="submit"]::-moz-focus-inner,input[type="file"]> input[type="button"]::-moz-focus-inner {border:none/*去虛線框*/;padding:0;}25 /*頻繁使用的css*/26 .cl{clear:both;}27 .fix{zoom:1;}28 .fix:after{content:".";display:block;height:0;font-size:0;overflow:hidden;clear:both;}29 .fl{float:left;}30 .fr{float:right;}34 .rel{position:relative;}35 .abs{position:absolute;}37 .block{display:block;}38 .none{display:none;}39 /*字型(unicode):宋體(\5B8B\4F53)黑體(\9ED1\4F53)微軟雅黑(\5FAE\8F6F\96C5\9ED1)*/40 body{font:12px/150% \5B8B\4F53,sans-serif;}
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.