<!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> </head> <body> <form method="post"> <input type="text" placeholder="中文"> <input type="submit" value="Submit"> </form> </body> </html>
如图,在IE11中打开该网页,在文本框中输入中文,文本框的位置立刻往下偏移1像素。去掉中文后,位置又自动偏移回来了。
解决方法:给文本框设置垂直对齐方式vertical-align就行了。
<input type="text" placeholder="中文" style="vertical-align:top">