3
我正在使用html5范围标记,我不知道为什么,但我得到了与Firefox的问题。对铬它工作正常... 这里是我的代码HTML5范围标签与Firefox的问题?
<div id="slider">
5% <input id="slide" type="range"
min="5" max="200" step="5" value="100"
onchange="updateSlider(this.value)" />
200%
</div><br/>
<div id="chosen">0</div>
和CSS是
#chosen {
border-radius:10px;
width:45px;
padding-top:10px; padding-bottom:10px;
background-image: -webkit-linear-gradient(top, #cccccc, #330000);
background-image: -o-linear-gradient(top, #cccccc, #330000);
background-image: -moz-linear-gradient(top, #cccccc, #330000);
text-align:center;
color:#ffffff;
font-weight:bold; font-size:large;
margin-left:40px;}
#slider {
margin-left:10px;
}
input[type='range'] {
-webkit-appearance: none;
padding-left:2px; padding-right:2px;
-webkit-border-radius: 5px;
background-image: -webkit-linear-gradient(top, #000000, #333333, #000000);
}
,我还使用了一些JavaScript:
function updateSlider(slideAmount) {
//get the element
var display = document.getElementById("chosen");
//show the amount
display.innerHTML=slideAmount;
}
[Firefox尚未实现'> yet](https://developer.mozilla.org/en-US/docs/HTML/Element/input#Browser_compatibility)。 – Passerby
ohhh我没有意识到这一点......感谢信息... :) – FLF