스타일 textDecorationLine 속성
예시
텍스트를 가로지르는 선으로 요소를 표시합니다.
document.getElementById("demo").style.textDecorationLine = "line-through";
정의 및 사용
textDecorationLine 속성은 데코레이션에 포함할 선 유형(있는 경우)을 설정하거나 반환합니다.
참고: textDecorationLine, textDecorationStyle 및 textDecorationColor 속성의 약식 속성인 textDecoration 속성을 사용하여 textDecorationLine을 설정할 수도 있습니다.
참고: 밑줄 및 윗줄 과 같이 둘 이상의 값을 결합 하여 텍스트 아래 및 위에 선을 표시할 수도 있습니다.
브라우저 지원
Property | |||||
---|---|---|---|---|---|
textDecorationLine | 57.0 | 79.0 | 36.0 6.0 Moz |
7.0 Webkit | 44.0 |
통사론
textDecorationLine 속성을 반환합니다.
object.style.textDecorationLine
textDecorationLine 속성을 설정합니다.
object.style.textDecorationLine = "none|underline|overline|line-through|initial|inherit"
속성 값
Value | Description |
---|---|
none | Default value. Specifies no line for the text-decoration |
underline | Specifies that a line will be displayed under the text |
overline | Specifies that a line will be displayed over the text |
line-through | Specifies that a line will be displayed 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 |
기술적 세부 사항
기본값: | 없음 |
---|---|
반환 값: | 요소의 text-decoration-line 속성을 나타내는 String |
CSS 버전 | CSS3 |
관련 페이지
CSS 참조: text-decoration-line 속성
❮ 스타일 개체