Home > Web Front-end > CSS Tutorial > How to remove the input box style in css

How to remove the input box style in css

WBOY
Release: 2021-12-09 14:48:02
Original
3332 people have browsed it

In CSS, you can use the "border-style" attribute to remove the style of the input box. This attribute is used to set the border style of the element. When the value of the attribute is "none", the element will remove the border style. , the syntax is "input box element {border-style:none;}".

How to remove the input box style in css

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

How to remove the input box style in css

The default style of the input box is as follows:

How to remove the input box style in css

If you want to remove the style of the input box, you only need to use the border-style attribute to remove the style of the input box. When the value of the attribute is set to none, the style of the input box will be removed.

border- The style attribute is used to style all borders of an element, or set border styles for each side individually. The example is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
  input{  
  border-style:none;
  background-color:pink;
}
  </style>
</head>
<body>
  输入框:<input type="text" value="默认值">
</body>
</html>
Copy after login

Output result:

How to remove the input box style in css

(Learning video sharing: css video tutorial)

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

Related labels:
css
source:php.cn
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