Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【20170315】移动端下 Input placeholder 不垂直居中问题解决方案 #82

Closed
zhongxia245 opened this issue Mar 15, 2017 · 1 comment

Comments

@zhongxia245
Copy link
Owner

zhongxia245 commented Mar 15, 2017

PC端chrome设备模拟器里面

iphone7里面

区别

  • iphone7 下 placeholder 字体变成12px
  • 移动端下,placeholder 不垂直居中

解决方案:

input::-webkit-input-placeholder{
        font-size: 14px ;    //解决iphone下字体大小为12的问题(和input大小不一致)
        line-height: 1em;   //解决不垂直居中的问题
}
@zhongxia245 zhongxia245 changed the title 【20170315】移动端下 Input placeholder 不垂直居中问题解决反感 【20170315】移动端下 Input placeholder 不垂直居中问题解决方案 Mar 15, 2017
@mkitclear
Copy link

在 IOS 下出现这个问题,需要这样设置才可以 line-height:normal。解决方案来自 mengyujing的博客

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants