CSS border-bottom-width: 아래 테두리 두께

CSS border-bottom-width: 아래 테두리 두께

Baseline넓은 지원

모든 주요 브라우저가 지원하는 기능입니다.

CSS border-bottom-width 속성은 요소의 아래 테두리 두께를 설정합니다.

#target {
  background: lightblue;
  border: 1px dashed #0006;
  border-bottom-color: red;
  border-bottom-style: solid;
  height: 100px;
  width: 200px;
}
#target {
  border-bottom-width: 4px;
  /* border-bottom-width: 0.5em;   */
  /* border-bottom-width: thick; */
  /* border-bottom-width: 0; */
}
<div id="target"></div>

불러오는 중...

구문

selector {
  /* <length> 값 */
  border-bottom-width: 10em;
  border-bottom-width: 3vmax;
  border-bottom-width: 6px;

  /* 키워드 값 */
  border-bottom-width: thin;
  border-bottom-width: medium;
  border-bottom-width: thick;

  /* 전역 값 */
  border-bottom-width: inherit;
  border-bottom-width: initial;
  border-bottom-width: revert;
  border-bottom-width: revert-layer;
  border-bottom-width: unset;
}

border-bottom-width 속성에는 한 개의 키워드 또는 <length> 값을 사용합니다.

<line-width>

0 이상의 <length>, 또는 테두리의 두께를 나타내는 키워드 값 중 하나입니다. 키워드 값은 다음 중 하나여야 합니다.

  • thin
  • medium
  • thick

CSS 명세가 키워드에 대응하는 두께를 정의하진 않았으므로 구현체마다 정확한 값은 다를 수 있습니다. 그러나 항상 thin ≤ medium ≤ thick 순서로 두께가 증가하며, 단일 문서 내에서는 값이 일정합니다.

예제

키워드 두께 비교하기

.thin {
  border-bottom-width: thin;
}
.medium {
  border-bottom-width: medium;
}
.thick {
  border-bottom-width: thick;
}
.thin, .medium, .thick {
  border-bottom-color: red;
  border-bottom-style: solid;
  height: 30px;
  margin-bottom: 8px;
  text-align: center;
  width: 200px;
}
<div class="thin">thin</div>
<div class="medium">medium</div>
<div class="thick">thick</div>

불러오는 중...

명세

브라우저 호환성

MDN browser-compat-data
데스크톱모바일
iOSAndroid
SafariChromeFirefoxSafariChromeFirefoxSamsung Internet
border-bottom-width

같이 보기

마지막 수정:

CC BY-SA 4.0 unless otherwise noted. See LICENSE.