「CSS」border-left-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-left-style: dotted ;
スタイルシートのborder-left-styleを指定して、左枠のスタイルを指定します。

使用例

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

      max-width: 50% ;
      height: 100px ;
      line-height: 100px ;
      text-align: center ;
      margin: 20px auto 0 ;
}
</style>
</head>
<body>
<div id="cft">this is a test data</div>
</body>
</html>

実行結果
左枠の枠線がドットスタイルになります。

CSS

Posted by arkgame