+ 5
How to make button on image
its easy to make button on image using css and html
4 ответов
+ 6
To make an image a button:
<button><img src = URL_FOR_IMAGE_HERE /></button>
OR:
<img src = URL_FOR_BUTTON_HERE onclick = DO_SOMETHING />
To put a button over an image:
<img src = URL_FOR_BUTTON_HERE width = "50" height = "50"/>
<button style = "position: relative; right: 40px;">Click me!</button>
To set the background of a button to an image:
<button id = "btn">Click me!</button>
<style>
#btn {
width: 50px;
height: 50px;
background-image: url(URL_FOR_IMAGE_HERE);
background-size: 50px 50px;
}
</style>
Hope you find one of them useful!
+ 7
<button type="button">
<img src="submitpic.png" />
</button>
+ 2
it depends what you are trying to do. It is easy enough to add a button on top of an image and easy enough to make an image the background of a button/make an image itself the button. Keep in mind that buttons and links are different. You can do what the first comment said to make a button out of an image or use absolute positioning and containers to layer a button on top of an image, as well.
+ 1
<a href=site.com><img src=img.jpg width=1 height=1></img></a>