单击表单输入字段时如何摆脱蓝色外边框? [英] How to get rid of blue outer border when clicking on a form input field?

查看:140
本文介绍了单击表单输入字段时如何摆脱蓝色外边框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我想摆脱当你点击一个文本字段并开始输入数据时出现的蓝色闪耀。这是怎么完成的?



我是初学者,所以我没那么有经验。
我的代码是:

 < input type =textname =searchsize =40值=职位例如助理经理
style =background-color:white; border:
solid 1px#6E6E6E; height:31px; font-size:16px;
vertical-align :0px; color:#bbb
onfocus =if(this.value =='Job Title eg Assistant Manager'){this.value =
''; this.style.color ='# 000'}/>

谢谢!

James

解决方案

这个 CSS 片段应该适用于所有主流浏览器:

  input:focus {
outline:none;
}

如果没有,请尝试添加!重要的指令:

  input:focus {
outline:none!important;
}


Hi I want to get rid of the blue "shine" that appears when you click on a text field and begin to input data. How is this done?

I am a beginner so I am not that experienced. My code is:

<input type="text" name="search" size="40" value="Job Title e.g. Assistant Manager"  
style="background-color:white; border: 
solid 1px #6E6E6E; height: 31px; font-size:16px; 
vertical-align:0px;color:#bbb" 
onfocus="if(this.value == 'Job Title e.g. Assistant Manager'){this.value = 
'';this.style.color='#000'}" />

Thanks!

James

解决方案

This CSS snippet should work in all major browsers:

input:focus {
    outline:none;
}

If it doesn't, try adding the !important directive:

input:focus {
    outline:none !important;
}

这篇关于单击表单输入字段时如何摆脱蓝色外边框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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