如何从Opera中的输入[type =“number”]中删除箭头 [英] How to remove the arrows from input[type="number"] in Opera

查看:158
本文介绍了如何从Opera中的输入[type =“number”]中删除箭头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想要移除这些箭头,在某些情况下方便。

Just looking to remove these arrows, convenient in certain situations.

我想保留浏览器的内容纯粹的数字意识。因此将其更改为 input [type =text] 是不可接受的解决方案。

I would like to preserve the browser's awareness of the content being purely numeric however. So changing it to input[type="text"] is not an acceptable solution.

现在Opera是基于webkit的,这个问题是一个dulpicate:我可以隐藏HTML5号码输入的旋转框吗?

Now that Opera is webkit based, this question is a dulpicate of: Can I hide the HTML5 number input’s spin box?

推荐答案

使用一些简单的CSS,它似乎删除它们和工作正常。

I've been using some simple CSS and it seems to remove them and work fine.

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

本教程从CSS Tricks解释详细&还显示了如何为它们设置样式

这篇关于如何从Opera中的输入[type =“number”]中删除箭头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆