关于number框的一个小bug

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            input{width: 300px;height:50px;padding-left: 20px;font-size: 24px;margin: 0 auto;outline: none;}
                input::-webkit-outer-spin-button,
                input::-webkit-inner-spin-button {
                  -webkit-appearance: none;
                }
                input[type="number"]{
                  -moz-appearance: textfield;
                }

        </style>
    </head>
    <body>
        <input type="number" name="" id="" value="" placeholder="请输入手机号"/>
    </body>
</html>

上面代码是去掉number框的右侧箭头,但是呢?当我输入文字的时候,聚焦就出问题了,怎么解决?

阅读 2.1k
1 个回答
新手上路,请多包涵

不要用line-height

推荐问题