使用inherit属性值继承其父元素样式来覆盖UA自带样式。_html/css_WEB-ITnose
程序员文章站
2022-03-14 23:35:16
...
像button、input这样的表单控件,不同的浏览器都会有自己的样式风格(UA样式)。我们可以使用inherit继承其父元素样式,从而覆盖浏览器的UA样式。
button,input,select,textarea { color: inherit; font-family: inherit; font-style: inherit; font-weight: inherit;}
来自Airen的博客:http://www.w3cplus.com/css/back-to-the-roots.html
上一篇: javascript 中 .min.js 和.js 文件的区别?
下一篇: 浅谈小程序中的生命周期