本文摘自PHP中文网,作者coldplay.xixi,侵删。
html元素有默认样式,去除的方法:1、全局去除默认样式,代码为【*{padding:0;margin:0;box-sizing:..}】;2、a标签去除默认样式,代码为【a{text-decoration: none;color:#3】。
本教程操作环境:windows7系统、html5版,DELL G3电脑。
html元素有默认样式,去除的方法:
1、全局去除默认样式
1 | *{padding:0;margin:0;box-sizing: border-box;font-size: 14px;}
|
2、a标签去除默认样式
1 2 3 4 5 | a{text-decoration: none;color:#333;}
a:hover, a:visited, a:link, a:active {
color:#333;
}
|
3、li
4、img
1 2 3 4 | img{
vertical-align:top;
border:none;
}
|
5、button
1 2 3 4 5 6 | .button{
border:0;
background-color:none
outline:none;
-webkit-appearance: none;
}
|
6、select
1 2 3 4 5 6 7 8 9 | select {
border: none;
appearance:none;
-moz-appearance:none;
-webkit-appearance:none;
background: url( "http://ourjs.github.io/static/2015/arrow.png" ) no-repeat scroll right center transparent;
padding-right: 14px;
}
|
7、h1
阅读剩余部分
相关阅读 >>
Html table表格标签内容如何居中显示?表格的align属性的用法介绍
Html iframe标签怎么用
Html可以用jstl标签么
怎么用Html写hello world
Html怎么禁止复制粘贴
Html如何调用外部css
关于Html页面跳转传递参数问题解答
Html 速查列表
Html表格边框怎么去掉
Html bdo标签怎么用
更多相关阅读请进入《Html》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » html元素有哪些自带样式,如何去除