0
0
CSSmarkup~5 mins

Transform property in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the CSS transform property do?
The transform property changes the shape, size, or position of an element without affecting the document layout. It can move, rotate, scale, or skew elements visually.
Click to reveal answer
beginner
Name four common functions used with the transform property.
Common functions are:<br>1. translate(x, y) - moves the element.<br>2. rotate(angle) - rotates the element.<br>3. scale(x, y) - resizes the element.<br>4. skew(x-angle, y-angle) - slants the element.
Click to reveal answer
beginner
How does transform: translate(50px, 100px); affect an element?
It moves the element 50 pixels to the right and 100 pixels down from its original position, without changing the space it takes in the page layout.
Click to reveal answer
intermediate
What is the difference between transform: scale(2); and setting width and height to double?
Using scale(2) visually doubles the size but keeps the original layout space. Changing width and height actually changes the element's size and affects layout and surrounding elements.
Click to reveal answer
intermediate
Why is transform useful for animations and interactions?
transform is smooth and fast because it uses the GPU for rendering. It lets you move, rotate, or scale elements without reflowing the page, making animations look better and perform well.
Click to reveal answer
Which CSS property is used to move an element without changing its layout space?
Amargin
Btransform
Cposition
Dpadding
What does transform: rotate(45deg); do to an element?
AMoves it 45 pixels right
BScales it to 45% size
CRotates it 45 degrees clockwise
DSkews it by 45 degrees
Which transform function changes the size of an element?
Ascale()
Brotate()
Cskew()
Dtranslate()
If you want to slant an element horizontally, which transform function do you use?
Atranslate()
Brotate()
Cscale()
Dskew()
Why is using transform better for animations than changing top or left?
AIt uses GPU for smoother animations
BIt changes the layout faster
CIt changes the element's size
DIt disables user interaction
Explain how the CSS transform property can move, rotate, and scale an element. Give simple examples.
Think about how you can move or turn a picture without changing the space it takes on a wall.
You got /3 concepts.
    Describe why transform is preferred for animations compared to changing position properties like top or left.
    Imagine moving a toy on a table smoothly versus moving the whole table.
    You got /3 concepts.