Challenge - 5 Problems
Transform Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate2: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);
}Attempts:
2 left
💡 Hint
Remember that transform functions are applied in the order they are written.
✗ Incorrect
The transform property applies functions from left to right. So first the element rotates 45 degrees clockwise, then it moves 50px to the right along the rotated axis.
🧠 Conceptual
intermediate1: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.
Attempts:
2 left
💡 Hint
Think about which function stretches or shrinks the element.
✗ Incorrect
scale() changes the size of the element by stretching or shrinking it horizontally and/or vertically.
❓ layout
advanced2: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;
}Attempts:
2 left
💡 Hint
Transforms apply in the order written, affecting the coordinate system for the next transform.
✗ Incorrect
The element first moves 100px right, then rotates 90 degrees clockwise around its origin, then scales down to half its size.
❓ accessibility
advanced1:30remaining
How can CSS transform affect accessibility?
Which statement about CSS transform and accessibility is true?
Attempts:
2 left
💡 Hint
Think about how visual changes relate to keyboard and screen reader behavior.
✗ Incorrect
CSS transform changes how an element looks on screen but does not change its position in the document flow or keyboard navigation order.
❓ selector
expert2: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?Attempts:
2 left
💡 Hint
Think about how attribute selectors match substrings inside style attributes.
✗ Incorrect
The attribute selector [style*='rotate(45deg)'] matches any element whose inline style contains the substring rotate(45deg).