Home > Web Front-end > CSS Tutorial > How to clear input default style in css

How to clear input default style in css

王林
Release: 2021-06-08 16:43:02
Original
10438 people have browsed it

The way to clear the input default style in css is to set the attribute value of each attribute of the input to none, such as [background:none;outline:none;border:none;].

How to clear input default style in css

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

If we want to clear the default style of the input, then we can directly set the attribute value to none, for example:

input{
    background:none;  	
    outline:none;  	
    border:none;
}
Copy after login

If the input must have a border, but need to remove the selection blue box, you can use the following code:

input{  	
    background:none;  	
    outline:none;  	
    border:1px solid #ccc;
}input:focus{   
    border:none;
}
Copy after login

Related video sharing: css video tutorial

The above is the detailed content of How to clear input default style in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template