2012-12-21 47 views
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; 
} 
+1

[Firefox尚未實現'> yet](https://developer.mozilla.org/en-US/docs/HTML/Element/input#Browser_compatibility)。 – Passerby

+0

ohhh我沒有意識到這一點......感謝信息... :) – FLF

回答

1

火狐仍然不是招」實施它。我不知道爲什麼,但他們似乎把HTML表單擱置了一些。

+0

感謝您的信息..我不知道那... – FLF