예를 들어, this fiddle (IE에는 없으십시오)을 확인하십시오.범위 컨트롤 크로스 브라우저의 하단 부분을 채우십시오.
는 (사용자가 this link의 제어에 대한 설명을 볼 수있다.)
그녀는 -ms 필 저급 사용과 같은--ms 칠 상부 엄지 어느 쪽의 색을 제어 할 이 :
input[type=range]::-ms-track {
width: 300px;
height: 5px;
/*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
background: transparent;
/*leave room for the larger thumb to overflow with a transparent border */
border-color: transparent;
border-width: 6px 0;
/*remove default tick marks*/
color: transparent;
}
input[type=range]::-ms-fill-lower {
background: #777;
border-radius: 10px;
}
input[type=range]::-ms-fill-upper {
background: #ddd;
border-radius: 10px;
}
input[type=range]::-ms-thumb {
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: goldenrod;
}
input[type=range]:focus::-ms-fill-lower {
background: #888;
}
input[type=range]:focus::-ms-fill-upper {
background: #ccc;
}
The result (in IE) http://brennaobrien.com/assets/blog/custom-slider-ie-updated.png
그러나, 지금까지 내가 말할 수있는 ... ::-ms- ...
의사 요소는 IE에서 작동합니다. 크롬에서 위의 코드는 효과가없는 것 같습니다. 크롬, 난 그냥이와 끝까지 :
The result (in Chrome) http://brennaobrien.com/assets/blog/custom-slider.png
내가이 효과 크로스 브라우저를 달성하기 위해 무엇을 할 수 있는가?
감사합니다. 예를 들어 http://codepen.io/ryanttb/pen/fHyEJ :
** 이러한 의사 요소는 IE 외부에서 지원되지 않을 수 있습니다. ** 따라서 할 수있는 일이 없습니다. –
고마워요, @Paulie_D. 내 목표는 반드시 효과를 얻기 위해 -ms-fill-lower를 사용할 필요는 없습니다. 그냥 일을 끝내는 것입니다. 대신 사용할 수있는 요소가 다른가요? –
내가 아는 한은 아닙니다. 있다면 JS가 필요할 것입니다. 이 방법을 보자. 그것은 크로스 브라우저 다. IE 사용자가 뭔가를 더 얻는다는 것이다. 다른 브라우저의 사용자는 결코 알 수 없습니다. –