我想要一个11的字体大小,但Chrome和Firefox正在给我16.当我检查Chrome中的元素时,我看到并查看我看到的计算属性:
font-size: 16px;
table - medium user agent stylesheet
Style Attribute - 11px
table - medium user agent stylesheet
.v11gray - 11px style.css
Run Code Online (Sandbox Code Playgroud)
在Firefox中的计算样式下,我得到:
font-size: 16px
TABLE[0].style ? 11px element
.v11gray ? 11px style.css:19
Run Code Online (Sandbox Code Playgroud)
最后三行被删除了.为什么我的css规则被覆盖了?我有什么步骤可以找出来吗?
如果我有以下样式表:
user important declarations
user normal declarations
author normal declarations
user agent declarations
author important declarations
Run Code Online (Sandbox Code Playgroud)
并且需要将它们从最高优先级应用到最低优先级,我应该按顺序使用它们?
我试图隐藏通过用户代理样式输入的密码输入字段的自动填充样式。
在检查元素时,计算出的样式显示来自 user-agent-style 的颜色被覆盖并且正在应用 #fff,但实际计算的样式仍然是来自 user-agent 的颜色。
关于如何摆脱这种情况的任何想法?
这是我用来尝试覆盖它的 CSS:
.password {
border-right: none;
background-color: #fff !important;
}
#MainContent_txtPassword:-webkit-autofill, input:-internal-autofill-
previewed, input:-internal-autofill-selected, textarea:-internal-autofill-
previewed, textarea:-internal-autofill-selected, select:-internal-autofill-
previewed, select:-internal-autofill-selected {
background-color: white !important;
}
Run Code Online (Sandbox Code Playgroud)