FLAMES
FLAMES
KPCKevin Powell - Community
Created by FLAMES on 6/21/2023 in #front-end
How to display background image from url
I am unable to display background image with css, my research on the web has been fruitless, seemingly I am using the same markup and stylesheet as in stack overflow posts but it is just not working for me. Can you help me identify the problem? https://codepen.io/FLAMESpl/pen/QWJKgNJ My HTML:
<div class="img" />
<div class="img" />
My stylesheet:
.img {
width: 100px;
height: 100px;
background-image: url("https://www.svgrepo.com/show/452180/chrome.svg");
background-color: red;
}
.img {
width: 100px;
height: 100px;
background-image: url("https://www.svgrepo.com/show/452180/chrome.svg");
background-color: red;
}
3 replies