CSS

[CSS]見出し(テキスト)両サイドに線を引く

更新日:

両サイドに固定の長さの線を引く

h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  font-weight: 700;
}
h3:before, h3:after {
  border-top: 1px solid #CCCCCC;
  content: "";
  width: 55px;
}
h3:before {
  margin-right: 30px;
}
h3:after {
  margin-left: 30px;
}

-CSS

Copyright© WXY , 2024 All Rights Reserved Powered by STINGER.