占位符文本在Safari中不垂直居中 [英] Placeholder text is not vertically centered in Safari

查看:103
本文介绍了占位符文本在Safari中不垂直居中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你有什么想法如何获取占位符属性垂直居中的safari?

Do you have any idea on how to get the placeholder attribute to vertically center in safari? Though when you start typing, the text is perfectly centred.

推荐答案

对我来说很合适:

<input type="text" name="first_name" placeholder="Search" style="height: 50px;">

尝试更改:

#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;
}

这篇关于占位符文本在Safari中不垂直居中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆