如何在Ie9中禁用Html按钮的蓝色发光 [英] How To Disable Blue Glow For Html Button In Ie9

查看:97
本文介绍了如何在Ie9中禁用Html按钮的蓝色发光的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题之前已经被问过了,但我在使用IE9时遇到了一些困难。我有一个包含3个表单的html页面(因为每个表单都包含对网站上不同资源的请求)。 HTML看起来像这样:

 < form action =/ SomeController1 / Actionmethod =get>< button name =actionvalue =someValue>请求第一件事< / button>< / form> 
< form action =/ SomeController2 / Actionmethod =get>< button name =actionvalue =someValue>请求第二件事< / button>< / form>
< form action =/ SomeController3 / Actionmethod =get>< button name =actionvalue =someValue>请求第三件事< / button>< / form>

我试图禁用页面加载时显示在所有三个按钮上的蓝色光芒。我认为它看起来很混乱......



我试图实现的解决方案似乎并不奏效:

  button 
{
outline-width:0px;
概述:无;
}

无论如何,Firefox或Chrome都不会显示辉光,它似乎只是出现在IE中。我想我可以使用一个表单并在其中放置3个按钮,但这看起来更像是一种解决方法而不是解决方案。有没有办法使用CSS或JavaScript做到这一点?感谢!

编辑的问题:




解决方案


我只是希望摆脱蓝色。 b

因为Internet Explorer使用系统主题中的本机按钮,所以无法摆脱它。看看任何带有按钮的系统对话框,例如当你改变你的壁纸。



如果你愿意风格,你只能删除蓝色的内部光晕你可以从一个边框 / 背景(禁止使用原生样式)开始, p>

I know this question has been asked before, but I'm having some difficulty getting it to work in IE9. I have an html page with 3 forms in it (since each form contains a request to a different resource on a website). The html looks like this:

<form action="/SomeController1/Action" method="get"><button name="action" value="someValue">Request the first thing</button></form>
<form action="/SomeController2/Action" method="get"><button name="action" value="someValue">Request the second thing</button></form>
<form action="/SomeController3/Action" method="get"><button name="action" value="someValue">Request the third thing</button></form>

I'm trying to disable the blue glow that is showing up on all three buttons when the page loads. I think it looks really confusing...

The solution that I'm trying to implement, which doesn't seem to be working, is:

button
{
    outline-width: 0px;
    outline: none;
}

At any rate, the glow doesn't appear in Firefox or Chrome, it just seems to be appearing in IE. I suppose I could just use one form and put 3 buttons in it, but this seems a bit more like a workaround rather than a solution. Is there any way to do this using CSS or javascript? Any help will be appreciated!

Thanks!

Edit - Here's an image of the problem:

解决方案

I was just hoping to get rid of the blue color.

You can't just get rid of it, because Internet Explorer uses the native buttons, from your system theme. Take a look at any system dialog box with a button, for example when you change your wallpaper.

You can only remove the blue inner glow if you're willing to style a decent looking button yourself, starting with setting a border/background (which disables using the native style).

这篇关于如何在Ie9中禁用Html按钮的蓝色发光的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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