0
我有這個旋轉上/下按鈕在Google Chrome(Mac OS)中完美工作,但是當我用Safari打開它時,它有點偏離網格,並在Firefox中完全消失。CSS旋轉按鈕跨瀏覽器,適用於Chrome瀏覽器,但不適用於Firefox/Safari瀏覽器
任何人都可以幫助的CSS?感謝您的幫助
鉻(CSS工作真的很好):
Safari瀏覽器(從輸入字段那種關):
火狐(未示出在所有?):
/* style input number spinner */
input[type="number"] {
position: relative;
height: 25px;
}
/* Spin Buttons modified */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
background: #FFF url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAKUlEQVQYlWNgwAT/sYhhKPiPT+F/LJgEsHv37v+EMGkmkuImoh2NoQAANlcun/q4OoYAAAAASUVORK5CYII=) no-repeat center center;
width: 1em;
border-left: 1px solid #BBB;
opacity: 0.7;
/* shows Spin Buttons per default (Chrome >= 39) */
position: absolute;
top: 0;
right: 0;
bottom: 0;
}
input[type="number"]::-webkit-inner-spin-button:hover,
input[type="number"]::-webkit-inner-spin-button:active {
box-shadow: 0 0 2px #0CF;
opacity: 1;
}
<form>
<td><input type="number" min="0.001" step="0.001" name="price" value="" required=""></td>
</form>