「CSS」border-left-colorプロパティで左枠の色を指定する
環境
Google Chrome 103.0.5060.134
Windows 10 home 64bit
構文
border-left-color: 色の値 ;
使用例
左枠の色に紫色(#800080)を指定します。
<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 20px solid #333 ;
border-left-color: #800080 ;
max-width: 50% ;
height: 140px ;
line-height: 160px ;
text-align: center ;
margin: 25px auto 0 ;
}
</style>
</head>
<body>
<div id="cft">this is a test data</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 20px solid #333 ;
border-left-color: #800080 ;
max-width: 50% ;
height: 140px ;
line-height: 160px ;
text-align: center ;
margin: 25px auto 0 ;
}
</style>
</head>
<body>
<div id="cft">this is a test data</div>
</body>
</html>
<!DOCTYPE html> <html> <head> <style> div { border: 20px solid #333 ; border-left-color: #800080 ; max-width: 50% ; height: 140px ; line-height: 160px ; text-align: center ; margin: 25px auto 0 ; } </style> </head> <body> <div id="cft">this is a test data</div> </body> </html>