扫码关注官方订阅号
MUI 有一个滑块组件:https://mui.com/material-ui/react-slider/
我正在尝试找出如何禁用在小块上播放的动画以将其移动到新位置,以便它立即移动。有什么办法可以做到这一点吗?
您需要使用样式实用程序关闭滑块的拇指和轨道元素的 transition 属性:
transition
import Slider from '@mui/material/Slider'; import { styled } from '@mui/material/styles'; const CustomSlider = styled(Slider)(({ theme }) => ({ "& .MuiSlider-thumb": { transition: 'none' }, "& .MuiSlider-track": { transition: 'none' }, }));
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
您需要使用样式实用程序关闭滑块的拇指和轨道元素的
transition
属性: