Home  >  Article  >  Web Front-end  >  How to remove focus box in css

How to remove focus box in css

王林
王林Original
2021-06-08 14:39:054817browse

The way to remove the focus box in css is to add the style [input{outline:none}] to the input box. At this point, even if we enter content in the input box, the outer frame will not have focus.

How to remove focus box in css

The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.

Input is a very important element in HTML. It can provide user input. We need to add focused styles when inputting. But when there is focus, a border will appear, so what should we do if we want to remove the border? Let’s take a look at the specific methods below.

First create a new HTML and CSS document.

Create an input box content, here use the text in the input.

We now move the mouse into the input box. At this time, we can see that the border has focus.

input {
    outline: none;
}

At this time we add the above style to CSS and remove the border focus.

Now even if we enter content, the outer frame will not have focus.

Even if we add a border, it will not have any effect.

How to remove focus box in css

Related video sharing: css video tutorial

The above is the detailed content of How to remove focus box in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn