Flash cards
Review the key moves
What is the main idea behind CSS Image Hover Overlays?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
Which statement best captures the main point of this lesson?
Complete the missing token from the example code.
___: scaleX(-1);Put the learning moves in the order that makes the concept easiest to apply.
Flip an Image
Move your mouse over the image to flip it horizontally:
Example
img:hover {
transform: scaleX(-1);
}Live preview
Responsive Image Gallery
CSS can be used to create responsive image galleries. This example uses media queries to re-arrange the images on different screen sizes. Resize the browser window to see the effect:
Example
@media only screen and (max-width: 768px) {
div.gallery-item {
width: calc(50% - 20px);
}
}
@media only screen and (max-width: 480px) {
div.gallery-item {
width: calc(100% - 20px);
}
}Live preview
Tip
Read more about Responsive Web Design in our CSS RWD Tutorial .