「CSS」border-bottom-styleで下枠のスタイルを指定する

環境

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Google Chrome 103.0.5060.134
Windows 10 Home 64bit
Google Chrome 103.0.5060.134 Windows 10 Home 64bit
Google Chrome 103.0.5060.134
Windows 10 Home 64bit

書式
border-bottom-style: dotted ;
連続した丸い点を表示します。点の間の空白の量は仕様書で定義されておらず、実装依存です。
点の半径は、同じ辺の border-width の計算値の半分です。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<!DOCTYPE html>
<html>
<head>
<style>
#cft {
border: 6px solid #333 ;
border-bottom-style: dotted ;
max-width: 40% ;
height: 100px ;
line-height: 80px ;
text-align: center ;
margin: 30px auto 0 ;
}
</style>
</head>
<body>
<div id="cft">this is a test data</div>
</body>
</html>
<!DOCTYPE html> <html> <head> <style> #cft { border: 6px solid #333 ; border-bottom-style: dotted ; max-width: 40% ; height: 100px ; line-height: 80px ; text-align: center ; margin: 30px auto 0 ; } </style> </head> <body> <div id="cft">this is a test data</div> </body> </html>
<!DOCTYPE html>
<html>
<head>
<style>
#cft {
      border: 6px solid #333 ;
      border-bottom-style: dotted ;

      max-width: 40% ;
      height: 100px ;
      line-height: 80px ;
      text-align: center ;
      margin: 30px auto 0 ;
}

</style>
</head>
<body>

<div id="cft">this is a test data</div>

</body>
</html>

結果
div要素「cft」の下枠の枠線がドットスタイルになります。

CSS

Posted by arkgame