Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the effect of text attribute and Color Control attribute in html

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to achieve text attributes and color control attributes in html, the text is very detailed, has a certain reference value, interested friends must read!

I. Attributes of text decoration

1. Format: text-decoration:underline;

2. Value:

(1) Underline stands for underline

(2) line-through stands for strike-through

(3) overline stands for overline

(4) none means nothing in any format (default is this attribute)

Note: Most of the uses of none can be used to remove superlinks when we use the a tag, as demonstrated below:

Title p{ text-decoration: line-through; } u{ text-decoration: overline; } h2{ text-decoration:underline; } a{ text-decoration: none; I am an example of writing.

I am also a decorative word

I'm more of an example text, I'm a hyperlink.

3. shortcuts

td stands for text-decoration:none;

tdu stands for text-decoration:undeiline;

tdl stands for text-decoration:line-through;

tdo stands for text-decoration:overline;

II. Attributes of text alignment

1. Format: text-align:center;

2. Value:

(1) Center stands for center

(2) Right stands for right

(3) Left stands for left

3. shortcuts

ta ghostwriting text-align:left;

tar stands for text-align:right;

tac stands for text-align:center;

Summary: special remember default values, ordinary remember attribute values in the first letter of the word.

III. Attributes of text indentation

1. Format: text-indent:2em;

2. Value:

(1) 3em ghostwriting 3 characters

(2) 5px represents 5 pixels

3. Shortcuts:

ti stands for text-indent:;

ti2e stands for text-indent:2em;

d64_attribute_of_text p{ text-decoration: line-through; text-align: center; text-indent: 2em; } u{ text-decoration: overline; text-align: right; text-indent: 100px; } h2{ text-decoration:underline; text-align: left; } a{ text-decoration: none; I am an example of writing.

I am also a decorative word

I'm more of an example text, I'm a hyperlink.

IV. Color control attributes

1. Format: color: value;

2. Value:

(1) Color English words

Note: In general, common colors are expressed by corresponding English words, but the colors that English words can express are limited, that is, not all colors can be expressed by English words.

(2) RGB color selector

Note: red, green and blue primary colors, format: rgb (255, 0, 0) represents red, the numbers inside represent the brightness of the three primary colors, webstorm is very intelligent, you can write code directly beside the display color.

(3) RGBA Color Selector

Note: A format introduced by CSS3, in which the last letter a actually represents transparency, the maximum is 1, the minimum is 0, the smaller the value, the more transparent.

The above is "how to achieve text attributes and color control attribute effect in html" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report