Home >Web Front-end >HTML Tutorial >CSS reset重置样式_html/css_WEB-ITnose

CSS reset重置样式_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:34:511963browse

在一般我们写一个自己自定义的HTML的时候,我们会清除样式或者说重置样式

重置样式。清除浏览器默认样式,一切全部用自己的设置,并配置适合设计的基础样式

下面给出所有一般需要清除的样式:

html,body,h1,h2,h3,h4,h5,h6,div,dl,dt,dd,ul,ol,li,p,blockquote,pre,hr,figure,table,caption,th,td,form,fieldset,legend,input,button,textarea,menu{margin:0;padding:0;}

header,footer,section,article,aside,nav,hgroup,address,figure,figcaption,menu,details{display:block;}

table{ border-collapse : collapse ; border-spacing : 0; }

 

caption,th{ text-align : left ; font-weight : normal ;}

 

html,body,fieldset,img,iframe,abbr{ border : 0; }

 

i,cite,em,var,address,dfn{ font-style : normal ;}

 

[hidefocus],summary{ outline : 0; }

 

li{ list-style : none ;}

 

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

 

sup,sub{ font-size : 83% ;}

 

pre,code,kbd,samp{ font-family :inherit;}

 

q:before,q:after{ content : none ;}

 

textarea{ overflow : auto ;resize: none ;}

 

label,summary{ cursor : default ;}

 

a,button{ cursor : pointer ;}

 

h1,h2,h3,h4,h5,h6,em,strong,b{ font-weight : bold ;}

 

del,ins,u,s,a,a:hover{ text-decoration : none ;}

 

body,textarea,input,button,select,keygen,legend{ font : 12px /1.14  arial ,\5b8b\4f 53; color : #333 ; outline : 0; }

 

body{ background : #fff ;}

 

a,a:hover{ color : #333 ;}

在开始写代码的时候可以在一开始就把它全部引进去!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn