Home  >  Article  >  Web Front-end  >  How to set the color of html text box

How to set the color of html text box

青灯夜游
青灯夜游Original
2021-05-14 14:54:2125860browse

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="测试文字" />

How to set the color of html text box

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

<input type="text" style="background: red;" value="测试文字" />

How to set the color of html text box

3. Set the text color of the text box

<input type="text" style="color: red;" value="测试文字" />

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!

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