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 write text text attribute in css

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article will explain in detail how to write text text attributes in css. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

1. Color text color

Written: body {color:red}, H2 {color:#ooffoo}, h3 {color:rgb

II. Text-align text alignment

Written in: text-align:center;right;left;justify

Jusitify means that each line is expanded to be equal in width and the left and right margins are aligned

III. Text-decoration text modification

Written: text-decoration:none (default); overline;line-through;underline;blink;inherit

IV. Text-transform text conversion

Written: text-transform:none (default); uppercase (uppercase letters only); lowercase (lowercase letters only); capitalize (each word begins with an uppercase letter); inherit

5. Text-indent text indentation

Written: text-indent:0 (default is 0); length;% (percentage); inherit

VI. Word-spacing text interval

Written: text-spacing:normal (default, standard space); length;inherit

7. Line-height

Written: line-height:normal (default, reasonable line spacing); number (numbers are multiplied by the current font size to set line spacing); length;%;inherit

VIII. Direction text orientation

Written: direction:ltr (default, left to right); rtl (right to left); inherit

Nine: letter-spacing character spacing

Written: letter-spacing:normal (default); length (define fixed space, negative values are allowed); inherit

Ten: text-shadow text Shadow

Written: text-shadow:none (default); h-shadow (required. Horizontal shadows allow negative values); v-shadow (required. Vertical shadows allow negative values); blur (optional, blurred distance); color (optional, shadow color)

Eg:

H2 {text-shadow:2px2px#ff0000;}

Unicode-bidi is used with the direction property to set or return whether the text is rewritten to support multiple languages in the same document.

Unicode-bidi:normal (default, no additional embedded layer); embed (create an additional embedded layer); bidi-override (create an additional embedded layer). Reordering depends on the properties of the direction. ); initial (set the element to its default value); inherit

12. Vertical-align vertical alignment

Written: vertical-align:baseline (default, the element is placed on the baseline of the parent element); sub (subscript of vertically aligned text); super (superscript of vertically aligned text); top (aligns the top of the element with the top of the highest element in the line); text-top (aligns the top of the element with the top of the font of the parent element); middle (places this element in the middle of the parent element) Bottom (aligns the top of the element with the top of the lowest element in the line); text-bottom (aligns the bottom of the element with the bottom of the font of the parent element); length;% (arranges the element using the percentage value of the "line-height" attribute. Negative values are allowed); inherit

13. White-space specifies what to do with the white space in the element

Written as: white-space:normal (default. Whitespace is ignored by the browser.) ; pre (whitespace is retained by the browser. It behaves like a label in html; nowrap (the text does not wrap and the text continues on the same line until it encounters

Until the tag); pre-wrap (keep the white space sequence, but wrap normally); pre-line (merge the white space sequence, but keep the newline character); inherit

This is the end of this article on "how to write text text attributes in css". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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