SVG as Background

When using an SVG as background with background-size: cover, the background would sometimes appear with a space on the left side.  Depending on the browser width it would be anywhere from 1px to 5px.   To solve this the SVG needs the preserveAspectRatio=”none” property.

Found the solution to a similar problem here: https://stackoverflow.com/questions/9185434/using-svg-as-background-image

Tagged with:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.