Images are another important HTML element that can be greatly designed by using the classes of W3.CSS:
w3-round creates a moderate rounded corners. We can extend this round by adding -large, -xlarge, -xxlarge etc. w3-circle creates oval if the image is wide. If it is perfect square, the circle will also be perfect.
Output:
w3-padding can be extended as –small, -large, -xlarge to create more or less gap between the image and its border. w3-card-4 can also be extended as –card, -card-2 and –card-4.
Output:
India1
India2
India3
India4
India5
India6
Three more classes- w3-display-bottomleft, w3-display-bottommiddle and w3-display-bottomright can be used to position text on bottom of the image.
Output:
Responsiveness can be applied to an image by following three methods
The first image has no opacity. But next three images have increasing levels of opacity.
Output:
The first image has no gray-scale. But next three images have increasing levels of gray-scale.
Output:
The first image has no sepia. But next three images have increasing levels of sepia effect
Output:
A simple class w3-hover-effect can be used to add hover of different effects Like- w3-hover-opacity, w3-hover-grayscale, and w3-hover-sepia
A simple class w3-hover-opacity-off can be used to remove opacity effect on hover.
This code will first add a medium opacity level and then remove that opacity on hover:
NOTE: The class w3-hover-effect-off doesn't work with grayscale and sepia effects. It works only with opacity. Also in the class w3-hover-effect, we cannot use -min and -max extensions.