css background image resize to fit div code example
Example 1: css background image
background-image: url("image.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
Example 2: trim background image css
.tiledBackground {
background-image: url(https://www.mozilla.org/media/img/logos/firefox/logo-quantum.9c5e96634f92.png);
background-size: 150px;
width: 300px;
height: 300px;
border: 2px solid;
color: pink;
}