Open tsxoxo opened 2 years ago
<span v-if="show" style='position: absolute'>
The
https://stackoverflow.com/questions/14883250/css-transform-doesnt-work-on-inline-elements
Note:
span
is inline element
Firstly, you cannot translate an inline-element
Secondly taking away the body element styling does not affect the animation when I tried it.
Thanks for all the feedback!
I learned much about transform
.
The issue of <span>
not wanting to move has been answered for me :). (see links in @sadeghbarati's answer)
Still ot sure about the veering to the left or the disappearing at the end of the animation. 🤔
this is the expected behavior.
Vue version
3.2.37
Link to minimal reproduction
Vue Playground
Steps to reproduce
transform: translateY(100px)
ortransform: scale(2) translateY(100px)
as.v-enter-from, .v-leave-to
What is expected?
The element should smoothly move down in a straight line (and scale, if that is used) and stay visible at the end of the animation
What is actually happening?
These odd behaviors all occur when using a single
transform: translateY(100px)
as.v-enter-from, .v-leave-to
span
)transform: scale(2) translateY(100px)
) Element veers to the left to varying degrees (seemingly by changingdisplay
CSS property of container element)Demo
Vue playground Transform demo.webm
System Info
Any additional comments?
Really wish this would work