在chrome下:

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button{
    -webkit-appearance: none !important;
    margin: 0; 
}

Firefox下:

input[type="number"]{-moz-appearance:textfield;}

第二种方案:

将type="number"改为type="tel",同样是数字键盘,但是没有箭头。

原文链接:http://stackoverflow.com/questions/3790935/can-i-hide-the-html5-number-input-s-spin-box

appearance 参考链接:http://www.w3cplus.com/css3/changing-appearance-of-element-with-css3.html

【转】移除HTML5 input在type="number"时的上下小箭头的更多相关文章

  1. 移除HTML5 input在type="number"时的上下小箭头

    /*移除HTML5 input在type="number"时的上下小箭头*/ input::-webkit-outer-spin-button, input::-webkit-in ...

  2. 如何移除HTML5 input在type="number"时的上下小箭头

      在chrome下: input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{    -webkit-appearance ...

  3. 去掉input在type="number"时右边的上下箭头

    加了代码之后: input::-webkit-outer-spin-button, input::-webkit-inner-spin-button{ -webkit-appearance: none ...

  4. 移除HTML5 input在type="search"时的清除按钮

    input[type="search"]::-webkit-search-cancel-button { display: none; }

  5. input输入框type=number时的一个缺陷

    本来是在vue里发现获取不到 input[ type="number"]的值,就是输入两个小数点的数值,比如1.1.1,以为是vue的错误,然而不是,vue只做了数字处理 不明白为 ...

  6. 移除input在type="number"时的上下箭头

    网页在有些情况下,会需要input的输入的为单纯数字的文本框,此时type=number,但使用type=number时,输入框后面会有一个上下箭头,那么如何去掉上下箭头呢? <input ty ...

  7. input type 为 number 时去掉上下小箭头

    <input type="number" ...> <style> input::-webkit-outer-spin-button, input::-we ...

  8. [HTML] css3 输入框input类型为number时,去掉上下箭头方式

    <input type="number" ...> <style> input::-webkit-outer-spin-button, input::-we ...

  9. 去掉input【type=number】默认的上下箭头

    input::-webkit-inner-spin-button {-webkit-appearance: none;}input::-webkit-outer-spin-button {-webki ...

随机推荐

  1. Android 手机小闹钟

    Android 手机小闹钟 一.这一篇主要使用系统为我们提供的一个服务AlarmManager来制作一个Android小闹钟,同时还涉及到了自定义主题.判断第一次启动应用.自定义动画.对话框.制作关闭 ...

  2. 洛谷月赛 Hello World(升级版) - 动态规划

    题目背景 T1答案要mod1000000007(10^9+7),请重新提交,非常抱歉! 一天,智障的pipapi正在看某辣鸡讲义学程序设计. 题目描述 在讲义的某一面,他看见了一篇文章.这篇文章由英文 ...

  3. Python3基础 dict keys+values 循环打印字典中的所有键和值

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  4. 如何Python写一个安卓APP

    前言:用Python写安卓APP肯定不是最好的选择,但是肯定是一个很偷懒的选择,而且实在不想学习Java,再者,就编程而言已经会的就Python与Golang(注:Python,Golang水平都一般 ...

  5. No compatible targets were found Do you wish to a add new Android Virtual Device ?

    运行一个Android小程序时提示: No compatible targets were found Do you wish to a add new Android Virtual Device ...

  6. linux下kermit工具的使用

    1.环境: ubuntu16.04 2.背景: 想更换下位机内核 3.使用kermit进行串口传输 举例:传输文件到下位机 2.1首先进入下位机的uboot 2.2 使用uboot自带的命令从串口接收 ...

  7. 我在linux中使用的vundle 和 vimrc配置

    set nocompatible filetype off set rtp+=~/.vim/bundle/vundle/ call vundle#rc() Plugin 'gmarik/vundle' ...

  8. js自动小轮播

    使用定时器,换个图片地址. 从1到5换,如果大于5了再跳到1,点击停止时关闭定时器. <!-- Author: XiaoWen Create a file: 2016-12-08 13:19:2 ...

  9. UVa 120 煎饼

    https://vjudge.net/problem/UVA-120 题意:颠倒连续子序列,使之成为升序. 思路:按照从大到小的顺序,依次选择出一个数字进行分析: ①如果该数字已经在正确的位置上,则不 ...

  10. 告诉你什么是javascript的回调函数

    函数也是对象 想弄明白回调函数,首先的清楚地明白函数的规则.在javascript中,函数是比较奇怪的,但它确确实实是对象.确切地说,函数是用Function()构造函数创建的Function对象.F ...