css 删除输入周围的边框(Chrome,Safari)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 删除输入周围的边框(Chrome,Safari)相关的知识,希望对你有一定的参考价值。

/*
* === Remove border around the inputs (Chrome, Safari) ===
*/

/*
* — When an input element set to focus in WebKit browsers like Safari and Chrome, the browser will put a blue/yellow/red border around it.
This could be confusing and could make your design look different. To disable this you can use the following css. —
*/

/* remove border around all input elements */
input:focus {
    outline: none;
}

/* remove border around all textarea elements */
textarea:focus {
    outline: none;
}

/* remove border around all select elements */
select:focus {
    outline: none;
}

/* remove border around all input,textarea and select elements */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* remove border around all elements */
:focus {
    outline: none;
}

以上是关于css 删除输入周围的边框(Chrome,Safari)的主要内容,如果未能解决你的问题,请参考以下文章