Home > Article > Web Front-end > How to remove input borders in html
Methods to remove input borders: 1. Use the style attribute to set the "border: 0;" style; 2. Use the style attribute to set the "border-style: none;" style; 3. Use the style attribute to set the "border : transparent;" style.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
Here is an HTML document with two input input boxes
<!doctype html> <html> <head> <meta charset="UTF-8"> <style type="text/css"> input{ background-color: #FFC0CB; } </style> </head> <body> <input type="text" /><br /> <input type="text" /> </body> </html>
It can be seen that the input has a border, so if you want to remove the border of the input, How to do? Here are several methods.
Method 1: Use the style attribute in the input element to set border: 0;
Style
<input type="text" /><br /> <input type="text" style="border: 0;" />
Method 2: In the input element Use the style attribute setting in border-style: none;
Style
<input type="text" /><br /> <input type="text" style="border-style: none;" />
Method 3: Use the style attribute setting in the input elementborder: transparent;
Style
<input type="text" /><br /> <input type="text" style="border: transparent;" />
Recommended tutorial: "html video tutorial"
The above is the detailed content of How to remove input borders in html. For more information, please follow other related articles on the PHP Chinese website!