简体   繁体   中英

Image/Icon as submit button

How to make icon/image to be used as submit button (input)? I mean I have tried input type "image" but then I had white background around the envelope that I want to be my submit button. I would prefer to use '✉' code but I can't get rid off the background around it.

I am using code like this now but it really isn't really what I want

<input name="send" value="&#x2709;" type="submit">

that is how it look right now

您可以使用<input type="image"> ,更多信息, 访问https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/image

You could use the with aa class to apply the background image

<button class="mybgImage"></button>

With the CSS..

.mybgImage {
   width: 40px;
   height: 30px;
   background-image {'theNameOfMyBackgroundImage.png'}
 } 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM