删除 HTML 按钮/提交的完整样式 [英] Remove the complete styling of an HTML button/submit

查看:17
本文介绍了删除 HTML 按钮/提交的完整样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法完全删除 Internet Explorer 中按钮的样式?我为我的按钮使用了 css sprite,一切看起来都不错.

Is there a way of completely removing the styling of a button in Internet Explorer? I use a css sprite for my button, and everything looks ok.

但是当我单击按钮时,它会移动到顶部一点,这使它看起来变形.是否有 css 单击状态或鼠标按下状态?我不知道是什么触发了这种状态.

But when I click the button, it moves to the top a little, it makes it look out of shape. Is there a css click state, or mousedown? I don't know what triggers that state.

我知道这不是什么大问题,但有时小事很重要.

I know it's not a really big deal, but sometimes it's the small things that matter.

推荐答案

我假设当你说点击按钮,它会移动到顶部一点"你在谈论按钮的鼠标按下状态,当您释放鼠标单击时,它返回到正常状态?并且您正在使用以下方法禁用按钮的默认呈现:

I'm assuming that when you say 'click the button, it moves to the top a little' you're talking about the mouse down click state for the button, and that when you release the mouse click, it returns to its normal state? And that you're disabling the default rendering of the button by using:

input, button, submit { border:none; } 

如果是这样...

就我个人而言,我发现您实际上无法停止/覆盖/禁用此 IE 本机操作,这导致我稍微更改了我的标记以允许此移动并且不影响按钮的整体外观各种状态.

Personally, I've found that you can't actually stop/override/disable this IE native action, which led me to change my markup a little to allow for this movement and not affect the overall look of the button for the various states.

这是我最后的标记:

<span class="your-button-class">
    <span>
        <input type="Submit" value="View Person">
    </span>
</span>

这篇关于删除 HTML 按钮/提交的完整样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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