<section class="container first-image-container"></section>
<section class="container another-image-container"></section>
:root{
--imageBg: url("https://image.ibb.co/mHzNyL/pexels-photo-255379.jpg") no-repeat;
}
.container,.another-image-container{
height: 200px;
width: 300px;
margin: 10px auto;
}
.first-image-container{
background: var(--imageBg);
}
.another-image-container{
--imageBg: url("https://image.ibb.co/fPLArV/2.jpg") no-repeat;
background: var(--imageBg);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.