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在数据中声明:/。
我是一名优秀的程序员,十分优秀!