chrome input 光标垂直居中问题

http://blog.csdn.net/isaisai/article/details/42108333

chrome 下设置较高的input 的时候,光标不会居中(即使设置了相同的height 和line-height)

 

解决方法:部分高度使用 相同   padding-top 和padding-bottom 代替

 

 

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="gbk">
    <style type="text/css">
        .heightTest {
            padding: 10px 0px;
            height: 20px;
            line-height: 20px;
            font-size: 18px;
        }
    </style>
</head>
<body>
<input type="text" class="heightTest">
</body>
</html>

posted on 2015-06-05 16:18  鬼鬼丫404  阅读(248)  评论(0编辑  收藏  举报

导航