Thanks to visit codestin.com
Credit goes to developer.mozilla.org

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

border-bottom-color

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2015년 7월⁩.

border-bottom-color CSS 속성은 요소의 아래쪽 테두리 색상을 지정합니다. border-color 또는 border-bottom 단축 속성으로도 지정할 수 있습니다.

시도해 보기

border-bottom-color: red;
border-bottom-color: #32a1ce;
border-bottom-color: rgb(170, 50, 220, 0.6);
border-bottom-color: hsl(60, 90%, 50%, 0.8);
border-bottom-color: transparent;
<section class="default-example" id="default-example">
  <div class="transition-all" id="example-element">
    This is a box with a border around it.
  </div>
</section>
#example-element {
  background-color: #eee;
  color: #000;
  border: 0.75em solid;
  padding: 0.75em;
  width: 80%;
  height: 100px;
}

구문

css
/* <color> 값 */
border-bottom-color: red;
border-bottom-color: #ffbb00;
border-bottom-color: rgb(255, 0, 0);
border-bottom-color: hsla(100%, 50%, 25%, 0.75);
border-bottom-color: currentColor;
border-bottom-color: transparent;

/* 전역 값 */
border-bottom-color: inherit;
border-bottom-color: initial;
border-bottom-color: unset;

border-bottom-color 속성은 하나의 값을 사용해 지정합니다.

<color>

아래쪽 테두리의 색상.

형식 구문

border-bottom-color = 
<color> |
<image-1D>

<image-1D> =
<stripes()>

<stripes()> =
stripes( <color-stripe># )

<color-stripe> =
<color> &&
[ <length-percentage> | <flex> ]?

<length-percentage> =
<length> |
<percentage>

예제

테두리를 가진 간단한 상자

HTML

html
<div class="mybox">
  <p>
    This is a box with a border around it. Note which side of the box is
    <span class="redtext">red</span>.
  </p>
</div>

CSS

css
.mybox {
  border: solid 0.3em gold;
  border-bottom-color: red;
  width: auto;
}

.redtext {
  color: red;
}

결과

명세

Specification
CSS Backgrounds and Borders Module Level 3
# border-color
초기값currentcolor
적용대상all elements. It also applies to ::first-letter.
상속no
계산 값computed color
Animation typea color

브라우저 호환성

같이 보기