uni/vue transition不生效的解决办法
uni中目前还是使用vue2自上而下的过渡效果:/*** 从底部飞入*/.fly-in-from-bottom {// 进入过渡生效,离开过渡生效&-enter-active, &-leave-active {transition: transform .3s;}&-enter, &-leave-to {transform: translate3d(0, 100%,
·
uni中目前还是使用vue2
自上而下的过渡效果:
/**
* 从底部飞入
*/
.fly-in-from-bottom {
// 进入过渡生效,离开过渡生效
&-enter-active, &-leave-active {
transition: transform .3s;
}
&-enter, &-leave-to {
transform: translate3d(0, 100%, 0);
}
}
注意:
1、背景不跟着产生过渡效果的原因是过渡层被包裹在另一个元素当中,过渡元素需要单独存在
2、不使用vue3的过渡语法
3、uni中transition也还是能生效的
4、能用作折叠面板的弹出效果
更多推荐
已为社区贡献3条内容
所有评论(0)