ツイッターで見つけたこの方法を使いたいのですが、うまく行きません。
下記のコードを使って文章を書いたのですが、
画像の上のような状態のままで、検証モードで見ても擬似要素のコードが見つかりませんでした。(反映されていない??)
どうしたらうまく擬似要素を使えますでしょうか?
よろしくお願いします。
【追記】
行を揃えることは出来たのですが、赤い囲みのテキスト部分が左寄りになってしまいました。
赤い囲みを左右中央寄せにしたいのですが、どうしたらよいでしょうか?
<section class="strength-section"> <div class="strength-section-content"> <div class="strength-box"> <div class="strength-box-content"> <div class="strength-step"> <div class="strength-step-wrap"> <div class="strength-step-box step1 "> <h1>1.あああああああああああ</h1> <i class="fa fa-envelope" aria-hidden="true"></i> <div class="strength-step-box-content"> <ul> <li><i class="fas fa-check"></i>いいいいいいいいいいいいいいいいいい</li> <li><i class="fas fa-check"></i>うううううううううううううううううう</li> </ul> </div> </div> </div> </div> </div> </div> </div> </section>
.strength-section { height: auto; background-color: #045a87; padding: 20px; } .strength-section a { text-decoration: none; } .strength-section-content { max-width: 1140px; margin: 0 auto; } .strength-box { height: auto; border-radius: 40px; position: relative; } .strength-box-content { text-align: center; padding-top: 40px; font-weight: bold; } .strength-box-content p { font-size: 18px; color: #ffcc00; } .strength-btn-container { margin: 20px; } .strength-btn-container a { font-weight: bold; } .strength-btn-container button { border-radius: 20px; padding: 20px; } .strength-step { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } .strength-step-wrap { padding: 20px; } .strength-step-box { width: 264px; height: auto; border: 4px solid #ffcc00; border-radius: 24px; padding: 10px 20px 6px 20px; min-width: 255px; min-height: 298px; } .strength-step-box h1 { font-size: 21px; font-weight: bold; color: #ffcc00; } .strength-step-box i { font-size: 50px; border: 5px solid #ffcc00; border-radius: 60px; padding: 20px; color: #ffcc00; } .strength-step-box-content p { margin-top: 10px; font-size: 18px; color: #ffcc00; border: 0px solid #ffcc00; padding: 0px; } .strength-step-box-content i { margin-top: 10px; font-size: 18px; color: #ffcc00; border: 0px solid #ffcc00; padding: 0px; } .strength-step-box-content ul { list-style: none; } .strength-step-box-content ul li { font-size: 18px; color: #ffcc00; text-align: left; } .strength-step-box-content ul li::first-line { margin-left: -1em; } .strength-step-box .fa-handshake { font-size: 44px; padding: 20px 16px; }

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/12/27 11:04
2020/12/27 11:13
2020/12/27 11:40
2020/12/27 11:48
2020/12/27 11:56
2020/12/27 12:01
2020/12/27 12:09
2020/12/27 12:17
2020/12/27 13:51