Home > Web Front-end > HTML Tutorial > 使用inherit属性值继承其父元素样式来覆盖UA自带样式。_html/css_WEB-ITnose

使用inherit属性值继承其父元素样式来覆盖UA自带样式。_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:33:02
Original
1685 people have browsed it

像button、input这样的表单控件,不同的浏览器都会有自己的样式风格(UA样式)。我们可以使用inherit继承其父元素样式,从而覆盖浏览器的UA样式。

button,input,select,textarea {    color: inherit;    font-family: inherit;    font-style: inherit;    font-weight: inherit;}
Copy after login

来自Airen的博客:http://www.w3cplus.com/css/back-to-the-roots.html

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template