欢迎光临 - 我的站长站,本站所有资源仅供学习与参考,禁止用于商业用途或从事违法行为!

css教程

CSS全部标签属性重置语法

css教程 我的站长站 2020-12-28 共78人阅读

每个浏览器默认的属性不同,像谷歌浏览器不设置的话,默认每个元素是有外边距margin的,有的浏览器列表还会带上序号,有的浏览器就没有。

所以为了让所有浏览器都一致,在写CSS开始前,我们都需要用CSS把全部标签属性重置一次,我的站长站自用的重置CSS代码分享给大家。

*{padding:0px;margin:0px;box-sizing:border-box;}
h1,h2,h3,h4,h5{font-weight:normal;}
ul,ol,dl,li{list-style:none;}
input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;*font-size:100%;}
input{outline:none;background:none;}input::-ms-clear{display:none;}input::-ms-reveal{display:none;}input[type=text]::-ms-clear{display:none;}
textarea{resize:none;}
table{font-size:inherit;border-collapse:collapse;border-spacing:0;}
img,input,button{border:0px;}:focus{outline:0;}
a:link,a:visited{text-decoration:none;}
::-webkit-scrollbar{width:5px;height:5px;}
::-webkit-scrollbar-thumb{min-height:28px;padding-top:100;background-color:rgba(0,0,0,0.2);
-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:5px;-webkit-box-shadow:inset 1px 1px 0 rgba(0,0,0,0.1),inset 0 -1px 0 rgba(0,0,0,0.07);}

这段代码我的站长站用了很多次了,没有任何问题。

相关专题
css
css
2021-09-24 78

css是前端开发中的样式语言,学好CSS可以帮助开发出漂亮的模板,css专题为您整理本站所有css相关信息,包含css模板下载,css使用教程分享和css示例代码....