0
0
CSSmarkup~20 mins

Transform property in CSS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Transform Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate
2:00remaining
What is the output of this CSS transform?
Given this CSS code, what will be the visual effect on the element?
CSS
div {
  transform: rotate(45deg) translateX(50px);
}
AThe element moves 50px to the left, then rotates 45 degrees counterclockwise.
BThe element moves 50px to the right, then rotates 45 degrees clockwise.
CThe element rotates 45 degrees counterclockwise, then moves 50px to the left.
DThe element rotates 45 degrees clockwise, then moves 50px to the right.
Attempts:
2 left
💡 Hint
Remember that transform functions are applied in the order they are written.
🧠 Conceptual
intermediate
1:30remaining
Which transform function changes the size of an element?
Choose the CSS transform function that changes the size of an element without affecting its position.
Atranslate()
Bscale()
Crotate()
Dskew()
Attempts:
2 left
💡 Hint
Think about which function stretches or shrinks the element.
layout
advanced
2:30remaining
What is the visual result of this transform sequence?
Consider the CSS below. What will the element look like after these transforms?
CSS
div {
  transform: translate(100px, 0) rotate(90deg) scale(0.5);
  width: 200px;
  height: 100px;
  background-color: teal;
}
AThe element rotates 90 degrees clockwise, moves 100px right, and shrinks to half size.
BThe element shrinks to half size, rotates 90 degrees clockwise, then moves 100px right.
CThe element moves 100px right, rotates 90 degrees clockwise, and shrinks to half size.
DThe element moves 100px right, shrinks to half size, then rotates 90 degrees clockwise.
Attempts:
2 left
💡 Hint
Transforms apply in the order written, affecting the coordinate system for the next transform.
accessibility
advanced
1:30remaining
How can CSS transform affect accessibility?
Which statement about CSS transform and accessibility is true?
ATransform changes the element's position visually but does not affect keyboard focus order.
BTransform moves the element and automatically updates the tab order for keyboard navigation.
CTransform disables screen readers from reading the transformed element.
DTransform causes the element to be removed from the accessibility tree.
Attempts:
2 left
💡 Hint
Think about how visual changes relate to keyboard and screen reader behavior.
selector
expert
2:00remaining
Which CSS selector targets elements with a transform that includes rotate(45deg)?
Given multiple elements with different transform values, which selector matches only those with rotate(45deg) in their transform property?
A[style*='rotate(45deg)']
B[style$='rotate(45deg)']
C[style^='rotate(45deg)']
D[transform='rotate(45deg)']
Attempts:
2 left
💡 Hint
Think about how attribute selectors match substrings inside style attributes.