Home >Web Front-end >CSS Tutorial >How to remove borders from css input

How to remove borders from css input

青灯夜游
青灯夜游Original
2021-04-29 17:17:5011553browse

How to remove the input border in css: 1. Use the "border:none;" statement to define a borderless style to remove it; 2. Use the "border:0;" statement to set the border width to 0 to remove it; 3. Use the "border:transparent;" statement to set a transparent border to remove it.

How to remove borders from css input

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

Method 1: Use border:none;

border attribute to set all border attributes. When the value is none, it means that the border attribute is not set or canceled for the label element. Border attribute, defines the borderless style.

<!DOCTYPE html>
<html> 
	<head>
		<meta charset="UTF-8">
		<style type="text/css">
			input{
				background-color: papayawhip;
			}
			#qd{
				border:none;
			}
		</style>
	</head>
	<body>
		<input type="text" value="测试输入框"/><br /><br />
		<input id="qd" type="text" value="测试输入框"/>
	</body>

</html>

Rendering:

How to remove borders from css input

##Method 1: Use border:0;

Remove by setting the width of the border to 0


#qd{
	border:0;
}

Rendering:

How to remove borders from css input

Method 3: Use border :transparent;

Remove

#qd{
	border:transparent;
}

by setting the border style to transparent color:


How to remove borders from css input

(Learning video sharing:

css video tutorial)

The above is the detailed content of How to remove borders from css input. 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