当前位置: 首页 > Web前端 > CSS

css-重置代码

时间:2023-03-30 16:28:42 CSS

最常用*{-webkit-box-sizing:border-box;-moz-box-sizing:边框框;box-sizing:border-box;}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:边框框;box-sizing:border-box;}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{边距:0;填充:0;}body{背景:#fff;颜色:#555;字体大小:14px;font-family:"宋体","微软雅黑","黑体","宋体",sans-serif;}td,th,caption{font-size:14px;}h1,h2,h3,h4,h5,h6{字体粗细:正常;font-size:100%;}address,caption,cite,code,dfn,em,strong,th,var{字体样式:正常;字体粗细:正常;}a{颜色:#555;文字装饰:无;}a:悬停{文字装饰:下划线;}img{边框:无;vertical-align:middle;}ol,ul,li{list-style:none;}input,textarea,select,button{font:14px"Arial","MicrosoftYaHei","黑体","宋体",sans-serif;}table{border-collapse:collapse;}html{overflow-y:scroll;}.clearfix:before,.clearfix:after{content:"";display:inline-block;height:0;clear:both;visibility:hidden;}.clearfix{*zoom:1;}/*公共类*/.fl{float:left}.fr{float:right}.al{text-align:left}.ac{text-align:center}.ar{text-align:right}.hide{display:none}雅虎代码初化: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:"Arial","MicrosoftYaHei","黑体","宋体",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{边框:无;}ol,ul,li{列表样式:无;}input,textarea,select,button{font:14px"宋体","微软雅黑","黑体","宋体",sans-serif;}表{边框折叠:折叠;}html{overflow-y:scroll;}.clearfix:after{content:".";显示:块;高度:0;清除:两者;可见性:隐藏;}.clearfix{*缩放:1;}/*公共类*/.fl{float:left}.fr{float:right}.al{text-align:left}.ac{text-align:center}.ar{text-align:right}.hide{display:none}腾讯QQ官网样式初始化:body,ol,ul,h1,h2,h3,h4,h5,h6,p,th,td,dl,dd,form,fieldset,legend,input,textarea,select{margin:0;padding:0}body{font:12px"宋体","ArialNarrow",HELVETICA;background:#fff;-webkit-text-size-adjust:100%;}a{color:#2d374b;text-decoration:none}a:hover{color:#cd0200;text-decoration:underline}em{font-style:normal}li{list-style:none}img{border:0;vertical-align:middle}table{border-collapse:collapse;border-spacing:0}p{word-wrap:break-word}新浪官网样式初始化:body,ul,ol,li,p,h1,h2,h3,h4,h5,h6,表单、字段集、表格、td、img、div{margin:0;padding:0;border:0;}body{background:#fff;color:#333;font-size:12px;margin-top:5px;font-family:"SimSun","宋体","ArialNarrow";}ul,ol{list-style-type:none;}select,input,img,select{vertical-align:middle;}a{text-decoration:none;}a:link{color:#009;}a:visited{color:#800080;}a:hover,a:active,a:focus{color:#c00;text-decoration:underline;}淘宝官网样式初始化:body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,按钮、输入、文本区域、th、td{margin:0;填充:0;}body,button,input,select,textarea{font:12px/1.5tahoma,arial,\5b8b\4f53;}h1,h2,h3,h4,h5,h6{字体大小:100%;}address,cite,dfn,em,var{font-style:normal;}code,kbd,pre,samp{font-family:couriernew,courier,monospace;}small{字体大小:12px;}ul,ol{列表样式:无;}a{文本装饰:无;}a:hover{文字装饰:下划线;}sup{垂直对齐:文本顶部;}sub{垂直对齐:文本底部;}图例{颜色:#000;}字段集,即时通讯g{边界:0;}button,input,select,textarea{font-size:100%;}表{边框折叠:折叠;边界间距:0;}网易官网样式初始化:html{overflow-y:scroll;}body{margin:0;填充:29px00;字体:12px"\5B8B\4F53",sans-serif;背景:#ffffff;}div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,blockquote,p{padding:0;margin:0;}table,td,tr,th{font-size:12px;}li{list-style-type:none;}img{vertical-align:top;border:0;}ol,ul{list-样式:无;}h1、h2、h3、h4、h5、h6{字体大小:12px;font-weight:normal;}address,cite,code,em,th{字体粗细:normal;字体样式:正常;}