javascript - 让 HTML5 数字输入旋转框像 mozilla 一样在 chrome 上始终可见?

标签 javascript jquery css html

<分区>

chrome 上的当前行为是仅当用户将鼠标悬停在其上时才会显示:

enter image description here

默认情况下,该旋转框是不可见的:
enter image description here

但在 Mozilla 中,它始终可见:

enter image description here
如何让旋转框在 Chrome 中始终可见?

https://jsfiddle.net/JerryGoyal/u4qoLcp4/

<input class="FlaggingPeriodTextBox" style=" width: 61px;    text-align: right;font-family: Segoe UI;margin-top: 9px;" type="number" min="1" max="999" value="7">

最佳答案

jsFiddle

input[type="number"]::-webkit-outer-spin-button, 
input[type="number"]::-webkit-inner-spin-button {
opacity: 1 !important;
}
<input class="FlaggingPeriodTextBox" style=" width: 61px;    text-align: right;font-family: Segoe UI;margin-top: 9px;" type="number" min="1" max="999" value="7">

--

关于javascript - 让 HTML5 数字输入旋转框像 mozilla 一样在 chrome 上始终可见?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36123363/

相关文章:

javascript - JQuery 文件输入在本地有效,但在远程服务器上无效

html - 使 div 的 "a"项不具有相同的 css 属性

javascript - 使 iframe 内容溢出到 iframe 范围之外

html - 为移动尺寸的屏幕移除 css 中的 flex

javascript - 如何从数组中找到更长的字符串?

JavaScript 属性访问 : dot notation vs. 括号?

javascript - 仅在一个部分实现整页js效果

javascript - Rails + Jasmine-Ajax : what is the correct way to test code triggered by `ajax:success` (jquery-ujs)

jquery - 使用 jQuery 隐藏/显示焦点和模糊输入的值文本

javascript - 当我单击关闭选项卡或关闭浏览器窗口时,是否可以将页面重定向到另一个 url?