Trying to make an image scroll from top to bottom on hover #13786
Unanswered
chantaseng
asked this question in
Help
Replies: 1 comment 3 replies
-
The default value for
Thus, after the end of the animation, the element is as it was if the If you'd like it to keep the end state, then you'd be after
},
animation: {
- scroll: 'scroll 5s linear',
+ scroll: 'scroll 5s linear forwards',
},
}, |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I made a custom animation where when i hover on an image, it would scroll to the bottom, but my problem is: why does it keep going back to its initial starting point once it reaches the bottom of the image?
This is my custom animation:
/** @type {import('tailwindcss').Config} /
export default {
content: ['./index.html', './src/**/.{js,ts,jsx,tsx}'],
theme: {
extend: {
keyframes: {
scroll: {
'0%': { transform: 'translateY(0%)' },
'100%': { transform: 'translateY(-58%)' },
},
},
animation: {
scroll: 'scroll 5s linear',
},
},
},
plugins: [],
};
Thank you very much for helping me guys!
Beta Was this translation helpful? Give feedback.
All reactions