CSS border-bottom-style 属性值说明

说明
none将不显示边界。默认值。
hidden与“none”相同,除了表元素的边界冲突解决。
dotted边框指定为一系列点。
dashed边框指定为一系列破折号。
solid边框指定为实线。
double边框指定为双实线。
groove这是一个三维槽边界,给人的印象,边界是雕刻。山脊的对面。
ridge指定三维脊状边界并提供拉伸外观的效果。槽的对面。
inset这是一个三维效果,让人觉得元素似乎嵌入。与开始相反。
outset这是一个三维效果,使印象中的元素似乎浮雕。与插图相反。
initial将属性设置为其默认值。
inherit从父元素继承属性。
CSS border-bottom-style 属性

CSS border-bottom-style 属性用于指定底部边框元素的样式。

不提及边框底部或者边框属性的样式,边框底部样式将不会出现。

我们需要知道规范没有定义不同样式的边框如何在角落中连接。

初始值none
应用于所有元素。
继承无效
可动画的无效
版本CSS1
DOM 语法object.style.borderBottomStyle=“dotted”;

语法

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

边框底部样式属性的示例:

<!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>带有实心底部边框的标题</h2>
     <div>带有虚线底部边框的 div 元素。</div>
  </body>
</html>

具有多个值的 border-bottom-style 属性示例:

<!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>带有双底边框的标题</h2>
     <p> 带有虚线底部边框的段落。 </p>
     <div>带有凹槽底部边框的 div 元素。</div>
  </body>
</html>

具有“隐藏”值的 border-bottom-style 属性示例:

<!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>具有边框底部样式属性的示例</h1>
  </body>
</html>

带有 "inset" 值的 border-bottom-style 属性示例:

<!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>具有边框底部样式属性的示例</h1>
  </body>
</html>

带有 "outset" 值的 border-bottom-style 属性示例:

<!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>border-bottom-style属性示例</h1>
  </body>
</html>
日期:2020-06-02 22:14:17 来源:oir作者:oir