
Shobha
The best way to predict the future is to invent it
What is a media query in CSS?
Media queries in CSS are used to apply different styles based on the device's characteristics, such as screen width, height, or orientation. This allows for creating designs that adapt to various screen sizes, enhancing the user experience across devices.
For example,
@media (max-width: 768px) {
body { font-size: 12px; } /* Smaller text on mobile devices */
}
For example,
@media (max-width: 768px) {
body { font-size: 12px; } /* Smaller text on mobile devices */
}