Will CSS load a url() attribute even if the selector does not apply to any element in the DOM?
.not-box {
background-image: url('https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon@2.png?v=73d79a89bded');
}
div.box {
background-image: url('https://cdn.iconscout.com/icon/free/png-512/stackoverflow-2752065-2284882.png');
height: 100px;
width: 100px;
}
<div class="box"> dssa</div>
So My Question is that Will the url() inside the .not-box selector load the image even if it is not used in the dom.
I am concerned about the loading time utilized in images which are not needed for the page in css.
Thanks for helping.