border-bottom-style

CSS border-bottom-style Property

The CSS border-bottom-style property is used to specify the style of the bottom border element.

Without mentioning the style of the border-bottom or border properties the border-bottom-style will not appear.

You need to know that the specification doesn’t define how borders of different styles connect in the corners.

类目类目
Initial Valuenone
Applies toAll elements.
InheritedNo.
AnimatableNo.
VersionCSS1
DOM Syntaxobject.style.borderBottomStyle = “dotted”;

Syntax

Syntax

border-bottom-style: none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset | initial | inherit;

Example of the border-bottom-style property:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      h2 {
        border-bottom-style: solid;
      }
      div {
        border-bottom-style: dashed;
      }
    </style>
  </head>
  <body>
    <h2>A heading with a solid bottom border</h2>
    <div>A div element with a dashed bottom border.</div>
  </body>
</html>

Result

Example of the border-bottom-style property with multiple values:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      h2 {
        border-bottom-style: double;
      }
      p {
        border-style: solid;
        border-bottom-style: dashed;
      }
      div {
        border-bottom-style: groove;
        border-bottom-width: 8px;
      }
    </style>
  </head>
  <body>
    <h2>A heading with a double bottom border</h2>
    <p> A paragraph with a dashed bottom border. </p>
    <div>A div element with a groove bottom border.</div>
  </body>
</html>

Example of the border-bottom-style property with the “hidden” values:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      h1 {
        color: red;
        text-align: center;
        border: 5px solid black;
        border-bottom-style: hidden;
      }
    </style>
  </head>
  <body>
    <h1>Examples with border-bottom-style property</h1>
  </body>
</html>

Example of the border-bottom-style property with the “inset” values:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      h1 {
        color: red;
        text-align: center;
        border: 5px solid;
        border-bottom-style: inset;
      }
    </style>
  </head>
  <body>
    <h1>Examples with border-bottom-style property</h1>
  </body>
</html>

Example of the border-bottom-style property with the “outset” values:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      h1 {
        text-align: center;
        border: 5px solid;
        border-bottom-style: outset;
      }
    </style>
  </head>
  <body>
    <h1>Examples with border-bottom-style property</h1>
  </body>
</html>

Values

Values

ValueDescriptionPlay it
noneWill show no border. Default value.Play it »
hiddenThe same as “none”, except in border conflict resolution for table elements.Play it »
dottedThe border is specified as a series of dots.Play it »
dashedThe border is specified as a series of dashes.Play it »
solidThe border is specified as a solid lines.Play it »
doubleThe border is specified as a double solid lines.Play it »
grooveIt’s a 3D grooved border and gives the impression that the border is carved. Opposite of ridge.Play it »
ridgeSpecifies a 3D ridged border and gives the impression of extruded appearance. Opposite of groove.Play it »
insetIt’s a 3D effect that make impression that the element appear embedded. Opposite of outset.Play it »
outsetIt’s a 3D effect that make impression that the element appear embossed. Opposite of inset.Play it »
initialSets the property to its default value.Play it »
inheritInherits the property from its parent element.


请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部