0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CSSでヘッダーリストに「|」線を入れる

Last updated at Posted at 2020-05-11

ヘッダーリストの項目の間に縦線を入れる方法
scssを使用した場合を想定しています。

キャプチャ.JPG

&+li::before {
  content: "";
  border-right: 1px solid #FFFFFF;
  position: absolute;
  display: block;
  top: 50%;
  height: 14px;
  margin-top: -7px;

li要素の疑似要素として、beforeを使う。
絶対配置として、position: absolute;を使い配置する。
最後は、margin-top: -7px;で中央寄せ

もしくは、

+li {
border-left:1px sorid #ffffff;
}

で対応する。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?