CSS

[border] CSS - border-top-width 속성 - 테두리상단두께 (= 테두리상단너비 = border-top-width속성 = 보더탑위드스/보더톱위드스 속성) (상속X)

목차

  1. border-top-width 예제 - 테두리 상단 두께 thin 경우
  2. border-top-width 정의
  3. border-top-width 구문
  4. border-top-width 예제 - medium 경우
  5. border-top-width 예제 - thick 경우
  6. border-top-width 예제 - 1px 경우
  7. border-top-width 예제 - 10px 경우

 

border-top-width 예제 - 테두리 상단 두께 thin 경우

 

<style>

h1 {

  border-top-style: solid;

  border-top-width: thin;

}


div {

  border-style: solid;

  border-top-width: thin;

}

</style>


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

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

 

결과보기

※ 주의: border-style 속성 정의 필수.

 

border-top-width 정의

 

테두리 상단 두께 지정.

 


 

1.

border-top-width 속성 지정 전 반드시 border-style 또는 border-top-style 속성을 먼저 정의 필요. (∵ 테두리 두께 변경하려면, 테두리 모양 필요)

 

2.

  • 기본값: medium
  • 상속여부: X
  • 애니효과: O
  • CSS버전: CSS1
  • JS구문: object.style.borderTopWidth="5px"

 

3.

모든 브라우저 지원.

 

4. MDN border-top-width 예제 보기

https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-width

 

 

border-top-width 구문

 

selector {border-top-width: medium|thin|thick|length|initial|inherit;}

 


[속성값]

thin
얇은 두께 (1px)
 
midium
중간 두께 (3px)
 
thick
굵은 두께 (5px)
 
length
px, cm, % 등 길이 단위값 (예) 5px 
 
initial
이 속성의 기본값으로 자동설정. 
 
inherit
부모 요소로부터 속성값 상속

※ 주의

  • none : 이런 속성값은 존재 X
  • 테두리 없애려면, 숫자 0 사용. (예) border-top-width:0;

  

 

border-top-width 예제 - medium 경우

 

<style>

h1 {

  border-top-style: solid;

  border-top-width: medium;

}


div {

  border-style: solid;

  border-top-width: medium;

}

</style>


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

<div>그누보드/영카트 강의</div>

 

결과보기

 

border-top-width 예제 - thick 경우

 

<style>

h1 {

  border-top-style: solid;

  border-top-width: thick;

}


div {

  border-style: solid;

  border-top-width: thick;

}

</style>


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

<div>그누보드/영카트 강의</div>

 

결과보기

 

border-top-width 예제 - 1px 경우

 

<style>

h1 {

  border-top-style: solid;

  border-top-width: 1px;

}


div {

  border-style: solid;

  border-top-width: 1px;

}

</style>


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

<div>그누보드/영카트 강의</div>

 

결과보기

 

border-top-width 예제 - 10px 경우

 

<style>

h1 {

  border-top-style: solid;

  border-top-width: 10px;

}


div {

  border-style: solid;

  border-top-width: 10px;

}

</style>


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

<div>그누보드/영카트 강의</div>

 

결과보기



분류 제목
selector CSS - :valid 가상선택자 - 유효요소 (= 유효값 갖는 요소 선택, IE10)
selector CSS - :invalid 가상선택자 - 유효하지 않는 값 요소 (= :invalid선택자 = 인밸리드 선택…
text CSS - text-fill-color 속성 (비표준) - 텍스트글자색 (= 글자전경색 =text-fill-…
outline CSS - outline 속성 ★ - 테두리 외곽선 일괄 지정. (= outline속성 = 아웃라인속성)
css CSS - 인풋태그 높이통일 (= 동일높이 = 높이동일 = 높이같게 = 세로길이 똑같게 = 높이맞추기) IN…
text CSS - direction 속성 - 텍스트방향 (= 텍스트진행방향 = direction속성 = 디렉션속성)…
box CSS - padding-top 속성 - 안쪽여백상단 (= padding-top속성 = 패딩탑속성 = 패딩톱…
box CSS - margin-bottom 속성 - 하단바깥여백 (= 하단마진, 아래쪽마진 = margin-bott…
gradient CSS - Gradient (그레이디언트 = 그라디언트) 종류 - (색번짐변화=색변화) : IE 10
box CSS - padding-left 속성 - 안쪽여백좌측 (= padding-left속성 = 패딩레프트속성)
background CSS - background-repeat 속성 ★ - 배경이미지 반복 (= 배경반복 = background…
selector CSS - [attribute] 속성선택자 - 특정 속성 보유 요소 (IE7) ※ 여러 속성 보유 선택자
selector CSS - [attribute=value] 속성선택자 - 지정속성값보유요소 선택 (IE7) ※ 특정 (속성/…
text CSS - word-break 속성 ★ - 한중일 외의 언어 (단어기준/글자기준) 줄바꿈규칙 지정 (= 줄…
box CSS - margin-right 속성 - 바깥여백우측 (= margin-right속성 = 마진라이트속성)
26/35
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티 2
웹유틸
회원센터
홈짱닷컴 PC버전 로그인