A developer needs to ensure that an SVG logo scales responsively with different screen sizes while maintaining its aspect ratio. Which SVG attribute should they focus on adjusting?
- height
- preserveAspectRatio
- viewBox
- width
In SVG, the preserveAspectRatio attribute allows developers to control how the SVG scales within its container while maintaining its aspect ratio. Adjusting this attribute ensures responsive scaling on different screen sizes.
Loading...
Related Quiz
- A web developer needs to create a layout where each child element occupies an equal amount of space, regardless of its content. Which display property should they use, Flexbox or Grid, and why?
- What is the primary purpose of the grid-template-areas property?
- The CSS property text-transform can be used to change the text to ________.
- When a new CSS property is in the experimental phase, it is often implemented with ________ to indicate that it is not yet standardized.
- How can you use media queries to target devices with retina displays specifically?