Home  >  Article  >  Web Front-end  >  How to remove input borders in html

How to remove input borders in html

青灯夜游
青灯夜游Original
2021-10-11 12:16:5024774browse

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.

How to remove input borders in html

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>

How to remove input borders in 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;" />

How to remove input borders in html

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;" />

How to remove input borders in html

Method 3: Use the style attribute setting in the input elementborder: transparent;Style

<input type="text" /><br />
<input type="text" style="border: transparent;" />

How to remove input borders in html

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!

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