文字の上に縦線を入れたい時のcss
下記CSSをテキスト内<div class=””>の中に入れることで縦線を入れられる。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
.aaaaaa { position: relative; display: inline-block; font-size: 16px; height: 70px; line-height: 70px; } .aaaaaa::before { content: ''; position: absolute; top: 0; left: 0; right: 0; width: 2px; height: 20px; margin: auto; background-color: #000; } |
コメントを残す