cuốn sách gpt4 ai đã làm

html -::ms-thumb 伪元素拖动后的行为

In lại Tác giả: Walker 123 更新时间:2023-11-28 03:10:19 25 4
mua khóa gpt4 Nike

有没有人对 IE11 中输入范围控件上的 ms-thumb 伪元素的样式和控制行为有任何经验?

如果控件比 thumb 伪元素高,则拖动后 thumb 会粘在顶部并且不会返回到它的原始位置。

Here's an example of the behaviour on codepen and the css being used (requires IE11 or Project Spartan/Edge)

.c-slider{
chiều cao: 60px;
background-color: #99CCFF;
padding:0px;
}

/*Slider Specific Styling*/

input[type=range]::-ms-thumb {
width: 30px;
height:7px;
border:1px solid #0066CC;
background-color:#0066CC;
con trỏ:con trỏ;
}

input[type=range]::-ms-thumb:active{
background-color:green;
}

input[type=range]::-ms-thumb:hover{
chiều cao: 60px;
width: 30px;
}

input[type=range]::-ms-fill-lower {
background: #A1A1A1;
}

input[type=range]::-ms-fill-upper {
background: #EBF5FF;
}


/*Slider Reset Css*/
input[type=range] {
-webkit-appearance: none; /* Hides the slider so that custom slider can be made */
width: 100%; /* Specific width is required for Firefox. */
}

input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
}

input[type=range]:focus {
outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */
}


input[type=range]::-ms-track {
chiều rộng: 100%;
con trỏ: con trỏ;
background: transparent; /* Hides the slider so custom styles can be added */
border-color: transparent;
color: transparent;
}

câu trả lời hay nhất

尝试将 thumb 的顶部和底部边距设置为 thumb 高度和控件高度之间差值的一半。

关于html -::ms-thumb 伪元素拖动后的行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30865226/

25 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress