Help us understand the problem. What is going on with this article?

【備忘録:HTML/CSS】cssのストック集って持ってたほうがいいよね?

使えるcssデザインストック

見出し下線を2配色

スクリーンショット 2020-06-02 10.08.15.png

index.html
<h2 class="m-heading2_pseudo-class">お知らせ(before、after)</h2>
<h2 class="m-heading2_borderimage">お知らせ(border-image)</h2>
style.scss
.m-heading2_pseudo-class{
  font-size: 24px;
  position: relative;
  max-width: 400px;
  padding-bottom: 10px;
  &:before{
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 5px;
    background: #e3bf00;
  }
  &:after{
    content: "";
    position: absolute;
    bottom: 0;
    left: 80px;
    width: calc(100% - 100px);
    height: 5px;
    background: #000;
  }
}
.m-heading2_borderimage{
  border-image: linear-gradient(.25turn,#e3bf00 80px,#111 80px) 1/0 0 5px 0;
  border-bottom: solid;
  max-width: 400px;
  padding-bottom: 10px;
}

見出し下線を中央で2配色

スクリーンショット 2020-06-02 10.11.18.png

index.html
<h2 class="m-heading2_linecenter">お知らせ</h2>
style.scss
.m-heading2_linecenter{
  text-align: center;
  padding-bottom: 10px;
  border-image: linear-gradient(
                90deg,
                #ddd 45%,#e3bf00 45%,
                #e3bf00 55%,#ddd 55%) 1/0 0 5px 0;
  border-bottom: solid;
}

参考元:
https://note.com/pulpstyle

hayahayahaya
ちょこちょこコーディングしてお勉強している人です。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした