chrome下input[type=text]的placeholder不垂直居中的問題解決


http://blog.csdn.net/do_it__/article/details/6789699

 

<input type="text" placeholder="search word" name="p" />

 

但是在chrome下顯示的search word並不能垂直居中。

 

后來找了很久終於在stackoverflow上找到了對應的方法。

參考:http://stackoverflow.com/questions/4919680/html5-placeholder-css-padding-problem

就是一句:把line-height設置為normal

 

line-height: normal; /* for non-ie */
line-height: 22px\9; /* for ie */


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM