How to make words write vertically in css

coldplay.xixi
Release: 2023-01-03 09:29:42
Original
5059 people have browsed it

How to write vertically in css: Use [writing-mode] to set the writing direction of the object. The syntax is [writing-mode: lr-tb, tb-rl], where [lr-tb] is from Left to right, from top to bottom, [tb-rl] from top to bottom, from right to left.

How to make words write vertically in css

The operating environment of this tutorial: windows7 system, css3 version, DELL G3 computer.

How to write vertically in css:

<strong>writing-mode</strong>(Set the writing direction of the object)

Syntax:

writing-mode : lr-tb、tb-rl
Copy after login

Parameters:

  • lr-tb: left to right, top to bottom

  • tb-rl: from top to bottom, from right to left

css code:

div { writing-mode: tb-rl; }
Copy after login

Example:

<!DOCTYPE html>    
<html>    
<head>    
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />    
<title>竖列排版实例</title>    
<style>    
div { writing-mode: tb-rl; }  
</style>    
</head>    
<body>   
<div>我是竖列排版</div>   
</body>    
</html>
Copy after login

Effect Picture:

How to make words write vertically in css

Related tutorial recommendations: CSS video tutorial

The above is the detailed content of How to make words write vertically in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!