Complete the code to define a custom keyframe named 'fadeIn' in Tailwind CSS.
module.exports = {
theme: {
extend: {
keyframes: {
fadeIn: {
'0%': { opacity: '0' },
'100%': { opacity: '[1]' }
}
}
}
}
}The opacity at 100% should be '1' to fully show the element.
Complete the code to add the custom animation 'fadeIn' with a duration of 2 seconds.
module.exports = {
theme: {
extend: {
animation: {
fadeIn: '[1] 2s ease-in-out'
}
}
}
}The animation name must match the keyframe name 'fadeIn' to work correctly.
Fix the error in the keyframe definition to make the 'slideRight' animation move from left to right.
keyframes: {
slideRight: {
'0%': { transform: 'translateX([1])' },
'100%': { transform: 'translateX(0)' }
}
}To slide from left to right, start at -100% (off screen left) and move to 0.
Fill both blanks to create a 'bounce' keyframe that moves up and down.
keyframes: {
bounce: {
'0%, 100%': { transform: 'translateY([1])' },
'50%': { transform: 'translateY([2])' }
}
}The element starts and ends at 0% vertical movement, and moves up by -25% at 50%.
Fill all three blanks to define a 'spinAndFade' animation that spins and fades out.
keyframes: {
spinAndFade: {
'0%': { transform: 'rotate([1])', opacity: [2] },
'100%': { transform: 'rotate([3])', opacity: 0 }
}
}The animation starts at 0 degrees rotation and full opacity (1), and ends at 360 degrees rotation and opacity 0.