- index.html
- style.css
HTML
<!DOCTYPE html>
CSS
.background {
height: 200px;
You’ve gone to a different page
GoalsCompleted 0 out of 2
The background image is assigned to the .no-viewbox
block without a viewbox, and it does not stretch.
- Set a background image address
has-viewbox.svg
for the.has-viewbox
block, and observe how the background with the viewbox behaves: The image fills the available space while maintaining its aspect ratio. - Set a background image address
has-viewbox-psa-none.svg
for the.has-viewbox-psa-none
block. Note how the background image is now stretched without preserving its aspect ratio, and the background is completely flexible.
Comments