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

How to clear input default style in css

王林
王林Original
2021-06-08 16:43:0210272browse

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;
}

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;
}

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!

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