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 use CSS to realize the Vertical arrangement of characters

2025-01-26 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 use CSS to achieve the vertical arrangement of text. 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.

There are two important attributes in the stylesheet's word processing properties: writing-mode and text-align. Let's take a look at their usage first:

1.writing-mode (sets the direction of object writing)

Syntax: writing-mode:lr-tb, tb-rl

Parameter: lr-tb: left to right, top to bottom tb-rl: top to bottom, right to left

Example:

CSSCode copies content to the clipboard

Div {writing-mode:tb-rl;}

2.text-align (sets the alignment of text in an object)

Syntax: text-align:left, right, center, justify

Parameter: left: align left right: align right center: Center justify: align both ends

Example:

CSSCode copies content to the clipboard

Div {text-align:center;}

The usual typesetting idea: setting the width of the text object can only arrange the width distance of one text, so that the text line can not be filled with two text to make the text wrap automatically, which forms the demand of vertical typesetting.

CSSCode copies content to the clipboard

Online demonstration of www.divcss8.com with vertical typesetting examples

Body {text-align:center}

.shuli {margin:0auto;width:20px;line-height:24px;border:1pxsolid#333}

I am vertical typesetting.

On "how to use CSS to achieve vertical text layout" this article is shared here, 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 out 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: 217

*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