+ 17
How can I add a picture in a button type?
so while making a button, how can I add some kinds of logo/pic along with text in that box? a coding example will be helpful 😃
8 ответов
+ 4
<input type="button" id="name">
in css:
#name{
background-image:url("image location");
};
image size and button size should be equivalent to view the image on website
+ 3
<button><img src="">Hello</button> to insert image
or if u r using any icon library like fontawesome
then
<button><i class="fa fa-home></i>Home</button>
+ 2
like an icon next to the text?
+ 1
Using following code we can easily embedded the logo/pic in any type of button:
<button type="button" style="background: url(<img address>)">Click Me!</button>
+ 1
<a href="url"><img src=""></a>
0
Button with 🍎 image
https://code.sololearn.com/Wzx7MyR4Eb8g/?ref=app