The background-size does not work, svg is displayed trimmed, trimmed as you like, but does not adjust to the parent block.
It should scale to its size, as happens with a bitmap image. What is it and how to fix it?
Here is the html and css code:
<div class="wrapperSvgImage"></div> .wrapperSvgImage { background-image: url(images/logo.svg); background-size: contain; border: 1px solid green; width: 40%; height: 40%; } .wrapperSvgImage { background-image: url(images/logo.svg); background-size: cover; border: 1px solid green; width: 40%; height: 40%; } 

background-size: contain;does not work? - Moonvvellcontainshould work. Here read css-tricks.com/using-svg - Moonvvell