Challenge: Combine Translation and Skewing
Task
Create an interactive information card about animals. Follow these steps to add dynamic effects on hover:
- Apply a
perspectiveof400pxto the parent element, adivwith the class namecontainer. - Utilize the
translateZ()function to bring the card (divwith the class namecard) closer to the user by50px. - Introduce a skew along the x-axis by
10degto the card description (divwith the class namecard-description-wrapper).
index.html
index.css
- For the parent container (div with the class name
container), set theperspectiveproperty to400pxto create a 3D space for the card transformations. - To bring the card (
divwith the class namecard) closer to the user, use thetranslateZ()function with a value of50px. This will simulate the card moving forward in the 3D space. - Apply a skew effect along the x-axis to the card description (
divwith the class namecard-description-wrapper) using thetransformproperty with theskewX()function and a value of10deg.
index.html
index.css
Everything was clear?
Thanks for your feedback!
SectionΒ 5. ChapterΒ 8
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.04
Challenge: Combine Translation and Skewing
Swipe to show menu
Task
Create an interactive information card about animals. Follow these steps to add dynamic effects on hover:
- Apply a
perspectiveof400pxto the parent element, adivwith the class namecontainer. - Utilize the
translateZ()function to bring the card (divwith the class namecard) closer to the user by50px. - Introduce a skew along the x-axis by
10degto the card description (divwith the class namecard-description-wrapper).
index.html
index.css
- For the parent container (div with the class name
container), set theperspectiveproperty to400pxto create a 3D space for the card transformations. - To bring the card (
divwith the class namecard) closer to the user, use thetranslateZ()function with a value of50px. This will simulate the card moving forward in the 3D space. - Apply a skew effect along the x-axis to the card description (
divwith the class namecard-description-wrapper) using thetransformproperty with theskewX()function and a value of10deg.
index.html
index.css
Everything was clear?
Thanks for your feedback!
SectionΒ 5. ChapterΒ 8