MUI 有一个滑块组件:https://mui.com/material-ui/react-slider/
我目前正在使用它来允许用户选择一个值范围(所以我的滑块有两个拇指) MUI 多拇指滑块文档:https://codesandbox.io/s/gptppq?file=/demo.js
滑块拇指的样式可以如下所示:https://codesandbox.io/s/359l9t?file=/demo.tsx:3809-3812
我的问题:如何使两个拇指具有不同的样式/颜色?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
您可以通过针对
data-index
prop 通过 CSS 属性选择器.例如:产生:
工作 CodeSandbox: https://codesandbox.io/s/mui-individually-styled-thumbs-c5m2q9