Challenge: Apply Scaling & Rotation
Task
Create an engaging online shop card for electronics, where each card includes an image, name, and price. The task is to enhance the visual appeal by incorporating the following animations:
- Scaling Image: Utilize the
increaseImageSizekeyframes rule to add a scaling effect to the image element, making it 20% larger. The final result should bescale(1.2). - Rotating Price: Implement the
rotatePricekeyframes rule to add a rotation effect to the price element, completing one full circle. The final result should berotate(360deg).
Use the predefined keyframes rules.
index.html
index.css
- For the scaling animation:
- At the start (0% spot), use
scale(1)to maintain the original size; - At the midpoint (50% spot), increase the size to
scale(1.1); - At the end (100% spot), increase the size to
scale(1.2).
- At the start (0% spot), use
- For the rotation animation:
- At the beginning (0% spot), keep the rotation angle at
rotate(0deg); - At the midpoint (50% spot), rotate halfway to
rotate(180deg); - At the end (100% spot), complete the rotation with
rotate(360deg).
- At the beginning (0% spot), keep the rotation angle at
index.html
index.css
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Can you show me the CSS code for the card with the animations?
How do I apply the scaling and rotation animations to the correct elements?
Can you provide a complete example of the online shop card with these effects?
Awesome!
Completion rate improved to 2.04
Challenge: Apply Scaling & Rotation
Swipe to show menu
Task
Create an engaging online shop card for electronics, where each card includes an image, name, and price. The task is to enhance the visual appeal by incorporating the following animations:
- Scaling Image: Utilize the
increaseImageSizekeyframes rule to add a scaling effect to the image element, making it 20% larger. The final result should bescale(1.2). - Rotating Price: Implement the
rotatePricekeyframes rule to add a rotation effect to the price element, completing one full circle. The final result should berotate(360deg).
Use the predefined keyframes rules.
index.html
index.css
- For the scaling animation:
- At the start (0% spot), use
scale(1)to maintain the original size; - At the midpoint (50% spot), increase the size to
scale(1.1); - At the end (100% spot), increase the size to
scale(1.2).
- At the start (0% spot), use
- For the rotation animation:
- At the beginning (0% spot), keep the rotation angle at
rotate(0deg); - At the midpoint (50% spot), rotate halfway to
rotate(180deg); - At the end (100% spot), complete the rotation with
rotate(360deg).
- At the beginning (0% spot), keep the rotation angle at
index.html
index.css
Thanks for your feedback!