【发布时间】:2014-01-12 15:48:03
【问题描述】:
我在 android 原生浏览器上遇到了一个问题。就我而言,我有一个带有占位符文本的输入。文本在所有浏览器上都正确显示,但在 android 本机浏览器上显示奇怪:
如您所见,文本不在垂直中间。我怎样才能把它放在垂直中间?我正在测试三星 Galaxy Note 10.1(android version is 4.1)
HTML:
<input type="text" id="my_input" placeholder="Please enter your password"/>
CSS:
input {
border: 3px solid green;
height: 43px!important;
padding: 0;
font-size: 23px;
}
编辑
加了line-height(line-height: 43px;)后变差了
【问题讨论】:
-
添加
line-height: 43px -
@Morpheus,我试过了,没用
-
我的意思是
input[placeholder]{ line-height: 43px}
标签: html css input placeholder android-browser