【发布时间】:2014-12-03 22:06:16
【问题描述】:
就在最近,我注意到 Google Chrome 中的文本输入存在显示问题,但仅在文本为空时才出现。
注意在顶部图像中,当输入为空时,光标在文本输入中太高了。
但是一旦我们输入一些文本,它就会自行纠正:
JSFiddle 来说明。可能需要 Google Chrome 版本:38.0.2125.101 m
HTML:
<input name="tb_password" type="password" id="tb_password" class=" validate[required,custom[password]]" placeholder="Type your password here" autocomplete="off" style="
margin: 0;
line-height: 46px;
">
CSS:
input[type="text"], input[type="password"] {
width: 100%;
height: 46px;
line-height: 46px;
font-size: 11pt;
color: #555 !important;
text-indent: 15px;
border-top: solid 1px #c5c5c5;
border-left: solid 1px #c5c5c5;
border-bottom: solid 1px #dadada;
border-right: solid 1px #dadada;
background: #fff;
-webkit-box-shadow: inset 0px 1px 5px 0px rgba(0, 0, 0, .1);
box-shadow: inset 0px 1px 5px 0px rgba(0, 0, 0, .1);
}
【问题讨论】:
-
奇怪...我这里有同样的问题,我认为这是一个 chrome 错误
-
是的,这绝对是 Chrome 38 中的一个错误。
-
似乎已在最新的 Chrome Canary 40 中修复。
-
这可能是这个错误的回归吗? code.google.com/p/chromium/issues/detail?id=47284
标签: html css google-chrome html-input