What is the @media rule in CSS used for?
- Applying styles to specific elements
- Creating animations
- Defining media queries for responsive design
- Importing external stylesheets
The @media rule is used for defining media queries in CSS. Media queries allow you to apply different styles for different devices or screen sizes, enabling the creation of responsive designs. It is not used for applying styles directly to elements, creating animations, or importing external stylesheets.
Loading...
Related Quiz
- What does the CSS rule "ul > li" specifically target?
- To define variables in LESS, the syntax used is @variableName: ________;.
- When optimizing for SEO, it's important to balance the number of font variations loaded, as each variation adds an additional ________ request.
- While using a CSS preprocessor, you notice that the compiled CSS has selectors that are excessively long and specific. What might be a potential cause for this in your source files?
- How can the improper use of custom fonts negatively impact accessibility on a website?