gpt4 book ai didi

Can use v-bind in keyframe?(可以在关键帧中使用v-bind吗?)

转载 作者:bug小助手 更新时间:2023-10-22 13:50:52 26 4
gpt4 key购买 nike



Why keyframes are not compiled correctly to v-bind in Vue3 doc: (https://vuejs.org/api/sfc-css-features.html)
I obtain i strange compiled string like --e9eea4ec- and the value not translate from data to animation keyframe.

为什么在Vue3文档中没有正确地将关键帧编译为v-bind:(https://vuejs.org/api/sfc-css-features.html)我得到了一个奇怪的编译字符串,比如e9eea4c,并且这个值没有从数据转换到动画关键帧。


   .goCenterfromRight {
animation: goCenterfromRight 1s ease-in-out backwards;
}

@keyframes goCenterfromRight {
0% {
translate: v-bind(myVar + 'vw' +' ' 0);
}

100% {
translate: 0 0
}
}

更多回答
优秀答案推荐

You should concatenate the 0 correctly :

您应该正确连接0:


     0% {
translate: v-bind(myVar + 'vw' +' '+ 0);
}

or just do

或者就这么做


     0% {
translate: v-bind(myVar + 'vw 0');
}

更多回答

Sadly is still not working, it got compiled like this var(--7a7a37b1-orizontalOffsetvw\ 0), where is myVar declared in data :/.

遗憾的是,它仍然不起作用,它被编译成这样的var(--7a7a37b1 orizontalOffsetvw\0),其中myVar在数据中声明:/。

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com