删除按钮上的3D按钮效果 [英] Remove 3D push effect on a button

查看:213
本文介绍了删除按钮上的3D按钮效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试删除HTML按钮元素上的所有效果。
HTML:

I'm trying to remove all effects on a HTML Button element. The HTML:

<div id="go">
<button onclick="load.update(true,cards.id);" type="submit"></button>
</div>

CSS:

#header #go button{
    display:block;
    border:0 none;
    cursor:pointer;
    outline:none;
    vertical-align:top;
    width:18px;
    height:33px;
    background:url('../images/cards/go.png'); //Just an image to replace it all.
}

在Chrome和Firefox中这很好,但在IE按钮的推效果仍然存在,当按钮被点击(EG的偏移)
有没有任何技巧我可以使用删除这种效果?
提前感谢!
Diesal。

In Chrome and Firefox this works fine, but in IE (8 at least) the "push" effect of the button is still there when the button is clicked (EG the offset) Is there any Tricks i can use to remove this effect? Thanks in advance! Diesal.

推荐答案

一种方法是删除< button> 标记,并在其位置中使用< a href =../> 标记。

One way would be to get rid of the <button> tag completely and use a <a href=".." /> tag in its place styled the way you want.

只需要链接进行javascript回发。

Just have the link do a javascript postback.

>:

一个示例:

update (from comments):
one example:

<a href="#" onclick="document.formName.submit();">Click Here</a>

当然,这需要javascript被启用,并被一些人认为是滥用标签。

Of course, this requires javascript to be enabled and is considered by some to be an abuse of the anchor tag.

如果您使用.net网络表单或jQuery,还有其他版本。

There are alternate versions if you are using .net webforms or jQuery.

这篇关于删除按钮上的3D按钮效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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