Styling a input type=number

前端 未结 8 1683
野趣味
野趣味 2020-12-12 23:17

Is it possible to apply a style in the inner \"up arrow\" and \"down arrow\" of a in CSS? I would like to change the background of

8条回答
  •  南笙
    南笙 (楼主)
    2020-12-13 00:04

    For mozila

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

    For Chrome

    input[type=number]::-webkit-inner-spin-button, 
    input[type=number]::-webkit-outer-spin-button { 
          -webkit-appearance: none; 
          margin: 0; 
    }
    

提交回复
热议问题