How to set the color of css text box

青灯夜游
Release: 2023-01-05 16:12:50
Original
10659 people have browsed it

How to set the color of the css text box: 1. Use the color attribute to set the text color in the text box; 2. Use the background-color attribute to set the background color of the text box; 3. Use the border-color attribute to set the text box The border color.

How to set the color of css text box

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

1. Use the color attribute to set the color of the text in the text box

<textarea>文本框,默认文本颜色</textarea><br>
<textarea style="color: red;">文本框,文本颜色为:红色</textarea>
Copy after login

Rendering:

How to set the color of css text box

2. Use the background-color property to set the background color of the text box

<textarea>文本框,默认背景颜色</textarea><br>
<textarea style="background-color: red;">文本框,背景颜色为:红色</textarea>
Copy after login

Rendering:

How to set the color of css text box

##3. Use the border-color property to set the border color of the text box

<textarea>文本框,默认边框颜色</textarea><br>
<textarea style="border-color: red;">文本框,边框颜色为:红色</textarea>
Copy after login
Rendering:

How to set the color of css text box

(Learning video sharing:

css video tutorial )

The above is the detailed content of How to set the color of css 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