使用 CSS 设定下边框样式


要设定底边框的样式,请使用 border-bottom-style 属性。可以设置边框值的选项包括点线、双线、虚线、实线等。

示例

你可以尝试运行以下代码来自定义底边框

在线演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         p.dotted {border-bottom-style: dotted;}
         p.double {border-bottom-style: double;}
         p.dashed {border-bottom-style: dashed;}
         p.solid {border-bottom-style: solid;}
         p.inset {border-bottom-style: inset;}
         p.outset {border-bottom-style: outset;}
      </style>
   </head>
   <body>
      <p class = "dotted">Dotted bottom border.</p>
      <p class = "double">Double bottom border.</p>
      <p class = "dashed">Dashed bottom border.</p>
      <p class = "solid">Solid bottom border.</p>
      <p class = "inset">Inset bottom border.</p>
      <p class = "outset">Outset bottom border.</p>
   </body>
</html>

输出

更新时间:21-Jun-2020

134 次浏览

开启你的 职业生涯

通过完成课程获得认证

开始学习
广告
© . All rights reserved.