← 静的パーツギャラリーへ戻る

パーツ番号 04-06-02 ・ CSSのみ

塗りつぶし背景型入力欄

枠線を使わず背景色で入力範囲を示すデザインです。フラットなデザインのフォームやニュースレター登録欄に馴染みます。

staticcss

プレビュー

ソースコード

HTML

<div class="d04-06-02-wrap">
          <label class="d04-06-02-label">メールアドレス</label>
          <input class="d04-06-02-input" type="text" placeholder="example@mail.com" readonly>
        </div>

CSS

.d04-06-02-wrap{width:100%;max-width:280px;display:flex;flex-direction:column;gap:8px;font-family:sans-serif}
        .d04-06-02-label{font-size:13px;color:#374151;font-weight:600}
        .d04-06-02-input{width:100%;box-sizing:border-box;padding:10px 14px;border:1px solid transparent;border-radius:8px;font-size:14px;color:#1f2937;background:#f1f5f9}

クラス名 .d04-06-02 は本ライブラリ内での識別用です。複数のパーツを同じページで使う場合は、重複しないよう名前を変更してください。