关于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

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题