找到你要的答案

Q:Remove blue border from image in Chrome

Q:去除铬图像中的蓝色边框

I've searched all over the web and tried every remedy posted to no avail; most of the answers don't fit my situation anyway.

The Code:

<form method = "post" action = "index.php">
    <input type = image alt = Submit alt = "" id = "zy" src = "Images/Button_Close_1.png" onmouseover = "this.style.cursor = 'hand';
     SetImage('zy','Images/Button_Close_2.png');
     return false;"  onmouseout = "SetImage('zy','Images/Button_Close_1.png');
     return false;" border = "0" height = "37" width = "183" />
</form>

SetImage is a javascript function which takes the first image and replaces it with the second, giving you a custom "hover" button.

There's probably an easier way to do it with CSS, but I've been using this code for a while.

The Issue: In the latest versions of Chrome (thank you, Google), these images all have an ugly blue border around them when you click them. I can't seem to get rid of it!

I need my custom images for my forms, but I really want to get rid of this line. Any ideas?

我搜遍了所有的网页,并尝试了每一种补救措施都无济于事,大多数的答案不符合我的情况。

代码:

<form method = "post" action = "index.php">
    <input type = image alt = Submit alt = "" id = "zy" src = "Images/Button_Close_1.png" onmouseover = "this.style.cursor = 'hand';
     SetImage('zy','Images/Button_Close_2.png');
     return false;"  onmouseout = "SetImage('zy','Images/Button_Close_1.png');
     return false;" border = "0" height = "37" width = "183" />
</form>

西雅图是一个JavaScript函数将第一图像和第二取代它,给你一个自定义的“悬停”按钮。

有可能是一个简单的方法来用CSS做的,但我一直在使用这个代码一会儿。

The Issue: In the latest versions of Chrome (thank you, Google), these images all have an ugly blue border around them when you click them. I can't seem to get rid of it!

我需要我的自定义图像为我的形式,但我真的想摆脱这条线。有什么想法?

answer1: 回答1:

As NKL in Remove blue border from open element suggest:

Try outline: none in your CSS

Example:

image{
    outline:none;
}

The blue border might seem ugly, but still it is good on pages to help with TAB navigation and for better orientation for disabled people.

作为从开放的元素删除NKL蓝边的建议:

试着在你的CSS没有大纲:

例子:

image{
    outline:none;
}

蓝色边框看起来丑陋,但它仍然是良好的页面,以帮助标签导航和更好的定位残疾人。

javascript  google-chrome