스타일 textDecoration 속성
예시
요소의 텍스트 장식을 설정합니다.
document.getElementById("demo").style.textDecoration = "underline overline";
정의 및 사용
textDecoration 속성은 텍스트에 대해 하나 이상의 장식을 설정하거나 반환합니다.
팁: 요소에 대해 둘 이상의 장식 유형을 지정하려면 공백으로 구분된 장식 유형 목록을 지정하십시오.
브라우저 지원
Property | |||||
---|---|---|---|---|---|
textDecoration | Yes | Yes | Yes | Yes | Yes |
통사론
textDecoration 속성을 반환합니다.
object.style.textDecoration
textDecoration 속성을 설정합니다.
object.style.textDecoration = "none|underline|overline|line-through|blink|initial|inherit"
속성 값
Value | Description |
---|---|
none | Defines a normal text. This is default |
underline | Defines a line under the text |
overline | Defines a line over the text |
line-through | Defines a line through the text |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
기술적 세부 사항
기본값: | 없음 |
---|---|
반환 값: | 텍스트에 추가된 장식을 나타내는 String |
CSS 버전 | CSS1 |
더 많은 예
예시
요소의 텍스트 장식을 반환합니다.
alert(document.getElementById("demo").style.textDecoration);
관련 페이지
CSS 튜토리얼: CSS 텍스트
CSS 참조: 텍스트 장식 속성
❮ 스타일 개체