Opera用户代理样式表覆盖了输入样式的CSS

时间:2018-10-03 13:52:56

标签: css browser opera

我在我的项目上使用picnic.css框架,输入的CSS被Opera用户代理样式覆盖。如何覆盖具有!important重要意义的歌剧风格。 我的输入CSS:

Input, textarea, .select select {
line-height: 1.5;
margin: 0;
height: 2.1em;
padding: .3em .6em;
border: 1px solid #ccc;
background-color: #fff;
border-radius: .2em;
-webkit-transition: all 0.3s;
transition: all 0.3s;
width: 100%;

}

Opera用户代理样式表如下:

input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
    background-color: rgb(250, 255, 189) !important;
    background-image: none !important;
    color: rgb(0, 0, 0) !important;
}

1 个答案:

答案 0 :(得分:0)

您可以使用选择器上的!important css属性覆盖自定义css文件中的用户代理样式