输入[type = range] CSS无法在Android设备上运行

时间:2015-12-11 04:48:08

标签: javascript android jquery html css

这是适用于dekstop的所需滑块css。

enter image description here

但只有在移动设备(android)上它才会显示出来。我想知道像输入这样的文本字段在哪里显示为附加到滑块。

enter image description here

这是小提琴http://jsfiddle.net/p5zo31q8/

CSS

/* INPUT RANGE*/

/*chrome*/
input[type=range]{
    -webkit-appearance: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 300px;
    height: 1px;
    background: #ddd;
    border: none;
    border-radius: 3px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    border: 1px solid #fff;
    height: 36px;
    width: 36px;
    border-radius: 50%;
    background: #4BDAFF;
    margin-top: -14px;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]:focus::-webkit-slider-runnable-track {
    background: #ccc;
}
/*firefox*/
input[type=range]{
    /* fix for FF unable to apply focus style bug  */
    border: 1px solid white; 

    /*required for proper track sizing in FF*/
    width: 200px;
}

input[type=range]::-moz-range-track {
    width: 300px;
    height: 5px;
    background: #ddd;
    border: none;
    border-radius: 3px;
}

input[type=range]::-moz-range-thumb {
    border: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: goldenrod;
}

/*hide the outline behind the border*/
input[type=range]:-moz-focusring{
    outline: 1px solid white;
    outline-offset: -1px;
}

input[type=range]:focus::-moz-range-track {
    background: #ccc;
}

/*internet*/
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;
}

/*scrollbar*/

::-webkit-scrollbar {
    width: 10px;

}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,176,240, 0.8); 
    margin-top:30px;
    margin-bottom:30px;
}

::-webkit-scrollbar-thumb {
    -webkit-box-shadow: inset 0 0 6px rgba(0,176,240, 0.8); 
    background-color:#00B0F0;
}
input[type='range']{

    background: #0c0;

    height:10px;

}



input[type='range']::-webkit-slider-thumb{

    background:#f60;

    height:30px;

    width:30px;

    border-radius: 30px;

}

0 个答案:

没有答案