I am using this code to show image
<img />
<style>
.imgpath{
width: 32px;
height: 32px;
background-image: url(/images/logout.png);
background-repeat: no-repeat;
}
</style>
What is causing this and how can I fix it?
This is my image
CodePudding user response:
When using the img
html tag, you are supposed to specify the src
. Since you didn't, it displays a default small image showing that the browser couldn't get an image from src
.
You have at least two possibilities depending on what you intend to do:
Use src
and remove background css rules: <img src="/images/logout.png"/>
Use another html tag, example: <div ></div>