如何在輸入字段中正確垂直居中佔位符?輸入佔位符垂直對齊
input[type='text']{
background-color: rgba(255,255,255,.4);
border:3px solid rgba(0,0,0,.5);
min-height: 45px;
border-radius: 6px;
color:#fff;
}
input[type='text']::-webkit-input-placeholder {
font-size: 30px;
color: rgba(255, 255, 255, 0.4);
line-height: 30px;
text-transform: uppercase;
vertical-align: middle;
}
下面是代碼https://jsfiddle.net/u6qfwg3w/
似乎心,你的意思水平? – Ivan
@ Ivan不是真的。也許是因爲我使用Chrome? https://s10.postimg.org/416p2ph2x/center.jpg –