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

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

问题描述

我有多个按钮,我使用JavaScript,当有人presses进入提交的第二个按钮的形式。

这个伟大的工程,但如果我打开这个形式在IE中的第一个按钮得到一个蓝色边框,告诉用户这样的按钮,这将是当你preSS输入pressed。

有什么办法去除与CSS不重写按钮的造型休息吗?

例如:

 <按钮的onclick =JavaScript的:警报('删除');>删除名称和LT; /按钮>


解决方案

认为这应该工作(只测试IE10在PC)的边界:

按钮{概述:0; }

要删除的背景(需要WebKit的/闪烁)?

地址:

背景:无;

需要摆脱边框(IE10中删除背景太):

边框:0;

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

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".

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

Example:

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

解决方案

Think this should work (only tested IE10 on PC) for the border:

button { outline: 0; }

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

Add:

background: none;

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

border: 0;

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

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