MENU

イントロボックスのCSS

<div class="point-box">
    <div class="point-title">
        <span class="icon"></span>ポイント
    </div>
    <ul>
        <li>◯◯◯</li>
        <li>◯◯◯</li>
        <li>◯◯◯</li>
    </ul>
</div>

<style>
.point-box {
    position: relative;
    margin: 2em 0;
    padding: 1em 1.5em 1em;
    border: 2px solid #f9d66b; /* 黄色の枠線 */
    background-color: #fffdf0; /* 薄い黄色の背景 */
    border-radius: 8px; /* 角を少し丸める */
    color: #333;
}

.point-title {
    position: absolute;
    top: -15px; /* 枠線の上に重ねる */
    left: 20px;
    background-color: #fff; /* 背景色と同じにして線を隠す */
    padding: 0 10px;
    font-weight: bold;
    color: #f9d66b;
    display: flex;
    align-items: center;
}

/* チェックアイコン(簡易版) */
.point-title::before {
    content: '✔';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: #f9d66b;
    color: white;
    border-radius: 50%;
    margin-right: 8px;
    font-size: 12px;
}

.point-box ul {
    list-style-type: disc;
    padding-left: 20px;
}

.point-box li {
    margin-bottom: 0.8em;
}

</style>
ポイント
  • ◯◯◯
  • ◯◯◯
  • ◯◯◯
よかったらシェアしてね!
  • URLをコピーしました!

この記事を書いた人

コメント

コメントする

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)

目次