【问题标题】:Opera user agent stylesheet is overriding css of input styleOpera 用户代理样式表覆盖输入样式的 css
【发布时间】:2018-10-03 13:52:56
【问题描述】:

我在我的项目中使用 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;
}

【问题讨论】:

    标签: css browser opera


    【解决方案1】:

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

    【讨论】:

    • 能否分享您的自定义文件 css sn-ps 和 Html 文件
    • 我找到了解决方案 :) 这是因为浏览器保存了我的电子邮件和密码,这就是我无法更改的原因
    猜你喜欢
    • 1970-01-01
    • 2013-02-16
    • 2016-06-10
    • 2015-03-07
    • 2013-12-05
    • 2015-02-22
    • 2011-11-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多