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

[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

부모요소의 속성값 상속.

 



분류 제목
css CSS - all 속성 - 해당요소와 그 부모요소의 모든 속성 일괄 지정 (= all속성 = 올속성)
text CSS - text-orientation 속성 - 블락방향 수직모드에서 문자방향 지정 (= 텍스트방향 지정 …
counter CSS - counter (카운터: 자동으로 번호 매기기) 시스템 작동원리 + 관련 속성 종류
background CSS - mix-blend-mode 속성 = 해당요소의 부모요소 배경색과의 '결합/혼합' 방법 지정 (= …
css CSS - translate 속성 - 2D/3D 상 요소 위치 좌표 변경 지정 (= translate속성 =…
css CSS - hanging-punctuation 속성 - 문장부호 위치 지정 (= hanging-punctua…
css CSS - user-select 속성 - 사용자가 요소의 텍스트를 선택 가능한지 여부 지정 (= user-s…
grid CSS - gap 속성(C) - (행/열) 사이의 간격 지정 (= gap속성 =갭속성) ※ (그리드/플렉스/…
text CSS - text-underline-position 속성 - 텍스트 언더라인 위치 지정 (= text-un…
grid CSS - Grid Item - 그리드 아이템
grid CSS - Grid Container - 그리드 컨테이너
counter CSS - content 속성 ★ - 생성된 콘텐츠 삽입 (= content속성 = 콘텐트속성/컨텐트속성)
css CSS - 구글 번역바 숨기기/제거 (Google TranslateBar hide/remove)
css CSS - 네임펜 (= 형광펜) 효과
grid CSS - Grid Intro - 그리드 소개 (※ 그리드 관련 속성 개괄)
css CSS - 코드펜 스타트 코딩 버튼 테두리 효과 (Codepen Start Coding Button Bord…
box CSS - inline-size 속성 - 인라인방향으로 요소 크기 지정 (= inline-size속성 = 인…
selector CSS - :enabled 가상선택자 - 활성화 된 요소 선택 (= 작동가능요소 = 실행가능요소 = :ena…
column CSS - column-rule 속성 - 컬럼구분자 스타일 일괄지정 (= 컬럼구분바 단축속성 = column…
column CSS - column-rule-style 속성 - 컬럼구분자 모양 지정 (= 컬럼구분바 생김새 = colu…
11/27
목록
찾아주셔서 감사합니다. Since 2012