Skip to content

Instantly share code, notes, and snippets.

@cp-sumi-k
Last active February 8, 2022 12:01
Show Gist options
  • Save cp-sumi-k/7e75f4d82bc04fc46c9650900fa734cb to your computer and use it in GitHub Desktop.
Save cp-sumi-k/7e75f4d82bc04fc46c9650900fa734cb to your computer and use it in GitHub Desktop.
<style lang="scss" scoped>
// translate image to 120% to right when image is entering to transition
.image-next-enter-active {
transform: translate(120%);
}
//stop transform when image has entered from right
.image-next-enter-to {
transform: translate(0%);
}
// hide image when it is leaving from transition
.image-next-leave-active {
display: none;
}
// translate image to -120% to left when image is entering to transition
.image-prev-enter-active {
transform: translate(-120%);
}
//stop transform when image has entered from left
.image-prev-enter-to {
transform: translate(0%);
}
// hide image when it is leaving from transition
.image-prev-leave-active {
display: none;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment