스타일 borderRight 속성
예시
<div> 요소에 오른쪽 테두리 추가:
document.getElementById("myDiv").style.borderRight = "thick solid #0000FF";
정의 및 사용
borderRight 속성은 약식 형식으로 최대 3개의 개별 border-right 속성을 설정하거나 반환합니다.
이 속성을 사용하여 다음 중 하나 이상을 설정/반환할 수 있습니다(순서에 관계없이):
- 테두리 오른쪽 너비
- 테두리 오른쪽 스타일
- 테두리 오른쪽 색상
브라우저 지원
Property | |||||
---|---|---|---|---|---|
borderRight | Yes | Yes | Yes | Yes | Yes |
통사론
borderRight 속성을 반환합니다.
object.style.borderRight
borderRight 속성을 설정합니다.
object.style.borderRight = "width style color|initial|inherit"
속성 값
Parameter | Description |
---|---|
width | Sets the width of the right border |
style | Sets the style of the right border |
color | Sets the color of the right border |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
기술적 세부 사항
기본값: | 명시되지 않은 |
---|---|
반환 값: | 요소의 오른쪽 테두리의 너비, 스타일 및/또는 색상을 나타내는 문자열 |
CSS 버전 | CSS1 |
더 많은 예
예시
<div> 요소의 오른쪽 테두리 너비, 스타일 및 색상을 변경합니다.
document.getElementById("myDiv").style.borderLeft = "thin dotted red";
예시
<div> 요소의 border-right 속성 값을 반환합니다.
alert(document.getElementById("myDiv").style.borderLeft);
관련 페이지
CSS 튜토리얼: CSS 테두리
CSS 참조: border-right 속성
HTML DOM 참조: 테두리 속성