How to set the color of html text box

青灯夜游
Release: 2023-01-06 11:13:12
Original
26014 people have browsed it

Method: 1. Use the style attribute to add the "border:width style color" style to set the border color of the text box; 2. Use the style attribute to add the "background:color" style to set the background color; 3. Use style attribute, add the "color:color" style to set the text color.

How to set the color of html text box

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

1. Set the border color of the text box

<input type="text" style="border:1px solid red;" value="测试文字" />
Copy after login

How to set the color of html text box

##2. Set the background color of the text box

<input type="text"   style="max-width:90%" value="测试文字" />
Copy after login
Copy after login

How to set the color of html text box

3. Set the text color of the text box

<input type="text"   style="max-width:90%" value="测试文字" />
Copy after login
Copy after login

How to set the color of html text box

Recommended tutorial: "

html video tutorial

The above is the detailed content of How to set the color of html text box. 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