CSS删除默认蓝色边框 [英] CSS remove default blue border

查看:260
本文介绍了CSS删除默认蓝色边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带多个按钮的表单,当有人按下时,我使用JavaScript提交第二个按钮。

I have a form with multiple buttons where I use a JavaScript to submit the second button when some one presses enter.

这很好,但如果我打开这个表单在IE中,第一个按钮获得一个蓝色边框,告诉用户这是当您按下时将按下的按钮。

This works great but if I open this form in IE the first button gets a blue border that tells the user "this is the button that will be pressed when you press enter".

有任何方法删除CSS

Is there any way to remove that with CSS without overriding the rest of the button's styling?

示例:

<button  onclick="javascript:alert('remove');">Remove name</button>


推荐答案

对于边框:

按钮{outline:0; }

button { outline: 0; }

想要移除背景(在WebKit / Blink上需要)?

Want to remove the background (needed on WebKit/Blink)?

添加:

background:none;

需要摆脱边框(删除IE10上的背景):

Need to get rid of the border (removes background on IE10 too):

border:0;

这篇关于CSS删除默认蓝色边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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