I am attempting to use Bootstrap 3 to display a smaller image instead of a larger one on small devices.
However, when I implement the code provided, nothing appears. If I directly put the image source in the HTML, both images are displayed in specific views. Do I need to specify a div size for this functionality to work?
Here is the HTML:
<div><img id="logo"></div>
And here is the CSS:
#logo {background-image: url('../images/logo.svg'); }
@media only screen and (max-width: 420px) {
#logo {background-image: url('../images/logo-small.svg'); }
}