使用图片作为提交按钮

编程入门 行业动态 更新时间:2024-10-24 21:31:03
本文介绍了使用图片作为提交按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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.

更多推荐

使用图片作为提交按钮

本文发布于:2023-11-26 20:04:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634998.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮   图片

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!