0

Something like this

HTML

<button class="img">This button has an image</button>
<button class="img">This button has the same image</button>

CSS

.img {
        url: '/testimage.png'
}
2

1 Answer 1

7

Use background-image property.

.img {
  background-image: url("testimage.png");
}
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.