Home  >  Article  >  Web Front-end  >  How to remove input cursor in css3

How to remove input cursor in css3

青灯夜游
青灯夜游Original
2021-12-15 11:48:154355browse

Removal method: 1. Add the "color:transparent;text-shadow: 0px 0px 0px #333;" style to the input element. 2. Add the "caret-color:transparent;" style to the input element.

How to remove input cursor in css3

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

css3 remove input cursor

##Method 1:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
	</head>
	<body>
		<input type="text" value="默认文本"/><br>
		<input type="text" value="去掉光标的默认文本" style="color:transparent;text-shadow: 0px 0px 0px #333;" />

	</body>
</html>

How to remove input cursor in css3

Method 2:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
	</head>
	<body>
		<input type="text" value="默认文本"/><br>
		<input type="text" value="去掉光标的默认文本" style="caret-color:transparent;" />

	</body>
</html>

How to remove input cursor in css3

(Learning video sharing:

css video tutorial)

The above is the detailed content of How to remove input cursor in css3. 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