【问题标题】:Revert webkit-appearance for input of type number恢复 webkit 外观以输入类型号
【发布时间】:2016-06-02 18:49:44
【问题描述】:

在我在整个应用程序中使用的 css 中,我有以下代码:

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

使用这种样式,来自数字类型输入的箭头隐藏在我的整个应用程序中。但在一页中,我有一个类型为 number 的输入元素和一个类“numberInGrid”,我希望为 .numberInGrid 元素显示箭头。我该怎么做?

【问题讨论】:

    标签: css


    【解决方案1】:

    外观css默认值正常使用.numberInGrid

    .numberInGrid{
      appearance:normal;
      -moz-appearance:normal;
      -webkit-appearance:normal;
    }
    

    【讨论】:

    • 我收到一个警告,提示 normal 是 -webkit-appearance 的无效值。
    猜你喜欢
    • 1970-01-01
    • 2014-06-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-03
    • 2015-07-09
    • 2016-03-12
    相关资源
    最近更新 更多