如何更改提交按钮外观? [英] how to change the submit button appearance?

查看:136
本文介绍了如何更改提交按钮外观?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的html代码中有这个简单的提交按钮。

I have this plain submit button appearance in my html code

<input type="submit" name="pay now" value="pay" />

我想让提交按钮看起来像这样

I wish to make the submit button look like this

<a href="#"><img src="images/shopping-cart/check-out-btn.png" border="0" /></a>

但应坚持其提交类型

推荐答案

您应该使用CSS:

input[type="submit"] {
    background: url(images/shopping-cart/check-out-btn.png);
    width: 200px; /* width of image */
    height: 50px; /* height of image */
    border: 0;
}

您应该可以使用更具体的选择器。

You should probably use a more specific selector though.

这篇关于如何更改提交按钮外观?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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