更新时间:2023-10-27 23:07:16
您的问题是, undefined属性:您正在将左
更改为 239px
,但不要显式指定为 0
。因此,它默认为 auto
,该值没有到 239px
的有效平滑过渡。
Your problem is that you are trying to animate from an undefined property: you are changing left
to 239px
, but don't explicitly specify it as 0
initially. It therefore defaults to auto
, a value for which there is no valid smooth transition to 239px
.
向基本定义中添加 left:0
即可。
Add left:0
to the base definition and you will be fine.