CSS Image Hover Overlays
This page covers CSS image hover effects including slide overlays, flip effects, and responsive galleries.
Image Hover Overlay
Create an overlay effect on hover:
Flip an Image
Move your mouse over the image to flip it horizontally:
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);
}
}
Try it Yourself »
Tip: Read more about Responsive Web Design in our CSS RWD Tutorial.