How to remove borders from css input

青灯夜游
Release: 2023-01-05 16:13:04
Original
11490 people have browsed it

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>
Copy after login

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;
}
Copy after login

Rendering:

How to remove borders from css input

Method 3: Use border :transparent;

Remove

#qd{
	border:transparent;
}
Copy after login
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!

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!