使用图片作为提交按钮 [英] Using an image as a submit button

查看:78
本文介绍了使用图片作为提交按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想创建自己的可点击按钮,我可以这样做:

If I want to make my own clickable buttons, I can do this:

<a href="javascript:;" class="button">Sign up</a>

a.button 的CSS规则该链接将显示为按钮。如果我对< input type =submit/> 应用相同的技巧,我得到按钮图像,但它显示在默认提交按钮的顶部,光标不会像在< a> 标签上那样改变为手。

Where CSS rules for a.button causes the link to be shown as a button. If I apply the same trick to <input type="submit" />, I get the button image but it is shown on top of the default submit button and the cursor doesn't change to a hand like it does on <a> tags.

这种行为?

推荐答案

您可以使用适当的CSS属性,例如

You can use appropriate CSS properties such as

border: none;
background: transparent;
cursor: pointer;

删除输入类型=submit code>按钮。

to remove the default styles from your input type="submit" button.

这篇关于使用图片作为提交按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆