• 회원가입
  • 로그인
  • 구글아이디로 로그인

[text] CSS - text-orientation 속성 - 블락방향 수직모드에서 문자방향 지정 (= 텍스트방향 지정 = text-orientation속성 = 텍스트오리엔테이션속성)

목차
  1. text-orientation 예제 - 텍스트 방향 지정
  2. text-orientation 정의
  3. text-orientation 구문

 

text-orientation 예제 - 텍스트 방향 지정

 

<style>

div{

  writing-mode: vertical-lr;

  border: 1px solid black;

  display: inline-block;

  height: 300px;

  width: 100px;

  margin: 5px;

}

div.a {

  text-orientation: mixed;

  background:yellow;

}


div.b {

  text-orientation: upright;

  background:pink;

}

div.c {

  text-orientation: sideways;

  background:tomato;

}

</style>


<div class="a">

  <h3>홈짱닷컴 Homzzang.com</h3>

  <p>HTML CSS JS PHP SQL 강의</p>

</div>


<div class="b">

  <h3>홈짱닷컴 Homzzang.com</h3>

  <p>HTML CSS JS PHP SQL 강의</p>

</div>

 

<div class="c">

  <h3>홈짱닷컴 Homzzang.com</h3>

  <p>HTML CSS JS PHP SQL 강의</p>

</div>

 

결과보기

 

text-orientation 정의

 

writing-mode 속성값이 vertical로 지정된 경우, 문자 방향 지정.

 


 

1.

writing-mode 속성값이 'vertical'로 지정된 경우에만 작동.

 

2.

  • 기본값: mixed
  • 상속여부: O
  • 애니가능: X
  • CSS버전: CSS3
  • JS구문: object.style.textOrientation="upright";

 

3.

IE 제외한 주요 최신 브라우저 모두 지원.

 

4. MDN text-orientation 예제보기

https://developer.mozilla.org/en-US/docs/Web/CSS/text-orientation

 

 

text-orientation 구문

 

selector {text-orientation: mixed|upright|sideways|sideways-right|use-glyph-orientation|initial|inherit;}

 


[속성값]

 

mixed

영문은 시계방향으로 90도 회전하고, 한글은 그대로 유지. (기본값)

 

upright

위쪽 향함. (회전 X)

 

sideways

영문/한글 모두 시계방향(=오른쪽)으로 90도 회전.

 

sideways-right

sideways와 같으나, 호환성 차원에서 속성명 유지.

 

use-glyph-orientation

SVG 요소에 사용하기 위해 텍스트는 더 이상 사용되지 않는 SVG 속성인 glyph-orientation-vertical 및 glyph-orientation-horizontal을 상속

 

initial

이 속성의 기본값 사용.

 

inherit

부모요소의 속성값 상속.

 


방문 감사합니다. (즐겨찾기 등록: Ctrl + D)

분류 제목
intro CSS - 정의・장점・구문・초기화 + 주석
intro CSS - 발전사 (CSS1 → CSS2.01 → CSS) + 제작관리 단체
intro CSS - 스타일 적용 방법 3가지 ★★★ - (인라인스타일 / 내부스타일 / 외부스타일) CSS적용순서 +…
selector CSS - 선택자 (Selector) 종류 + 선택자에 사용가능한 문자 (= 선택자 이름짓기 주의사항)
selector CSS - ID선택자, class선택자 + CSS우선순위 ★★★ (= 아이디선택자, 클래스선택자, CSS명시…
selector CSS - * 전체선택자 - 모든 요소 선택. (요소선택자군) ※ 아스테리크 (asterisk) 선택자 = …
selector CSS - element 요소선택자 ★ - 지정 요소 선택. (요소선택자군)
selector CSS - element,element 병렬선택자 ★ - 쉼표로 나열된 여러 요소 선택. (= 여러 요소선택…
selector CSS - element element 자손선택자 ★ - 자손요소 (요소선택자)
selector CSS - element>element 자식선택자 ★ - 직접 자식요소만 선택. (요소선택자, IE7)
selector CSS - element+element 인접선택자 ★★ - 바로 뒤 인접형제요소 (요소선택자, IE7) + …
selector CSS - element~element 형제선택자 ★★ - 지정요소 뒤의 모든 특정형제요소 (요소선택자군…
selector CSS - [attribute] 속성선택자 - 특정 속성 보유 요소 (IE7) ※ 여러 속성 보유 선택자
selector CSS - [attribute=value] 속성선택자 - 지정속성값보유요소 선택 (IE7) ※ 특정 (속성/…
1/25
목록
찾아주셔서 감사합니다. Since 2012