Computer >> 컴퓨터 >  >> 프로그램 작성 >> CSS

CSS의 쓰기 모드 속성

<시간/>

write-mode 속성은 텍스트 행을 가로로 배치할지 세로로 배치할지 설정하는 데 사용됩니다. 속성 값은 -

writing-mode: horizontal-tb|vertical-rl|vertical-lr;

예시

<!DOCTYPE html>
<html>
<head>
<style>
p {
   writing-mode: vertical-rl;
}
</style>
</head>
<body>
<h1>Demo Heading</h1>
<p>This is demo text.</p>
</body>
</html>

출력

CSS의 쓰기 모드 속성

예시

이제 다른 예를 살펴보겠습니다 -

<!DOCTYPE html>
<html>
<head>
<style>
p.demo1 {
   word-spacing: 1cm;
   color: blue;
   writing-mode: vertical-rl;
}
p.demo2 {
   word-spacing: 40px;
   writing-mode: horizontal-tb;
}
</style>
</head>
<body>
<h1>Demo Heading</h1>
<h2>Heading2</h2>
<p class="demo1">This is demo text.</p>
<h2>Heading2</h2>
<p class="demo2">This is demo text.</p>
</body>
</html>

출력

CSS의 쓰기 모드 속성