0
0
Tailwindmarkup~10 mins

Transform (scale, rotate, translate) in Tailwind - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to scale the box to 150% of its size using Tailwind CSS.

Tailwind
<div class="w-24 h-24 bg-blue-500 [1]"></div>
Drag options to blanks, or click blank then click option'
Ascale-150
Brotate-45
Ctranslate-x-4
Dscale-50
Attempts:
3 left
💡 Hint
Common Mistakes
Using rotate or translate classes instead of scale.
Using scale-50 which makes the element smaller.
2fill in blank
medium

Complete the code to rotate the box 90 degrees clockwise using Tailwind CSS.

Tailwind
<div class="w-24 h-24 bg-red-500 [1]"></div>
Drag options to blanks, or click blank then click option'
Ascale-90
Brotate-45
Ctranslate-y-6
Drotate-90
Attempts:
3 left
💡 Hint
Common Mistakes
Using scale classes instead of rotate.
Choosing rotate-45 which rotates only 45 degrees.
3fill in blank
hard

Fix the error in the code to translate the box 8 units to the right using Tailwind CSS.

Tailwind
<div class="w-24 h-24 bg-green-500 [1]"></div>
Drag options to blanks, or click blank then click option'
Atranslate-x-8
Btranslate-right-8
Ctranslate-8-x
Dtranslate-y-8
Attempts:
3 left
💡 Hint
Common Mistakes
Using translate-y-8 which moves vertically.
Using invalid class names like translate-8-x.
4fill in blank
hard

Fill both blanks to scale the box to 75% and rotate it 180 degrees using Tailwind CSS.

Tailwind
<div class="w-24 h-24 bg-purple-500 [1] [2]"></div>
Drag options to blanks, or click blank then click option'
Ascale-75
Brotate-90
Crotate-180
Dscale-125
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up rotation degrees.
Using scale-125 which makes the element bigger.
5fill in blank
hard

Fill all three blanks to translate the box 4 units right, 6 units down, and rotate it 45 degrees using Tailwind CSS.

Tailwind
<div class="w-24 h-24 bg-yellow-500 [1] [2] [3]"></div>
Drag options to blanks, or click blank then click option'
Atranslate-x-4
Btranslate-y-6
Crotate-45
Dscale-100
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping x and y translations.
Using scale classes instead of translate or rotate.