禁用Material UI的< LinearProgress/>动画片 [英] Disable Material UI's <LinearProgress /> animation

查看:76
本文介绍了禁用Material UI的< LinearProgress/>动画片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用材料UI < LinearProgressvariant ="determinate"/> 组件,默认情况下会在另一个< div>内转换< div> scaleX()属性; ,只要该值发生更改即可显示当前进度.这样做的效果是使所有内容看起来都平滑,这通常很不错,但是出于我的应用程序(音频搜寻栏)的目的,我想在值更改时完全禁用此动画.

I am using Material-UI's <LinearProgress variant="determinate" /> component which by default transforms the scaleX() property of a <div> inside another <div> whenever the value changes to visualize the current progress. It does so with an easing effect to make everything look smooth which generally is quite nice, however for the purpose of my application (audio seekbar) I would like to disable this animation entirely whenever the value changes.

有可能吗?

演示 codesandbox

推荐答案

我能够使用覆盖

bar: {
  transition: 'none
}
...

...
<LinearProgress variant="determinate" classes={{ bar: classes.bar}} />

这篇关于禁用Material UI的&lt; LinearProgress/&gt;动画片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆