現在、以下のコードを使用して HTML5 の入力タイプの範囲をスタイリングしています。
input[type="range"]{
-webkit-appearance: none;
-moz-apperance: none;
width: 100%;
height: 8px;
padding: 0 20px;
background: #024069;
border-radius: 2px;
margin-top: 25px;
}
input[type="range"]::-webkit-slider-thumb{
-webkit-appearance:none;
-moz-apperance:none;
width:25px;
height:25px;
-webkit-border-radius:20px;
-moz-border-radius:20px;
-ms-border-radius:20px;
-o-border-radius:20px;
border-radius:20px;
background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #fefefe), color-stop(0.49, #d7d7d7), color-stop(0.51, #d1d1d1), color-stop(1, #c8c8c8) );
border: 1px solid #787878;
}
これはすべて良いです。しかし今、私は実際のスライダーに 2 つの異なる色を持たせようとしているので、親指の左は青、親指の右は黒です。
:before を試しましたが、うまくいきませんでした。どうすればこれを達成できますか?