内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用
如何让占位符属性垂直居中在Safari浏览器?尽管当你开始打字时,文字完全居中。
<input type="text" name="first_name" placeholder="Search" style="height: 50px;">
css
#register-block-fields input {
width: 230px;
height: 41px;
padding-left: 40px;
padding-right: 20px;
height: 41px; // Changed from line-height
color: #878787;
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
background: none;
}