找不到输入元素的默认占位符样式。
没有任何 webkit-input-placeholder
、-moz-placeholder
、-moz-placeholder
或 -ms-input-任何 css 文件中的占位符
样式设置。
更新:伙计们,不要急于评判我。
我有遗留代码(css 文件的色调)。一种占位符样式(字体粗细、颜色等)在 IE 11 中未正确显示。我开始查找定义占位符样式的位置。而且我没有找到你们提到的任何占位符样式声明。
所以我假设浏览器中有一个默认的占位符样式。
最佳答案
Webkit 的用户代理样式表(Chrome 和 Safari)可以在这里找到:http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css
他们的 CSS 显示:
::placeholder {
-webkit-text-security: none;
color: darkGray;
pointer-events: none !important;
}
input::placeholder, isindex::placeholder {
white-space: pre;
word-wrap: normal;
overflow: hidden;
}
我找不到具有其他浏览器默认设置的任何其他来源,但我想他们会接近这个。
关于html - 在哪里可以找到输入占位符样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38435036/