본문 바로가기
명함 만들기 캐릭터 모음 16가지 디자인 · PNG / SVG / PDF

고정 하단 바

긴 화면을 끝까지 읽지 않아도 결정 버튼에 손이 닿아야 할 때, 화면 아래에 붙여 두는 조각.

레이아웃

실제 미리보기

출처

<div class="dc-stickyshell">
  <div class="dc-stickyshell__page">
    <p class="dc-stickyshell__line">용접 보조 — 경기 화성</p>
    <p class="dc-stickyshell__line">주 5일 · 오전 8시 ~ 오후 5시</p>
    <p class="dc-stickyshell__line">기숙사 제공, 점심 제공</p>
    <p class="dc-stickyshell__line">E-9 비자로 지원할 수 있습니다.</p>
    <p class="dc-stickyshell__line">교육 2주, 교육 기간에도 일당이 나옵니다.</p>
    <p class="dc-stickyshell__line">아래로 내려도 바는 자리에 남아 있습니다.</p>
  </div>
  <div class="dc-stickybar">
    <div class="dc-stickybar__info">
      <span class="dc-stickybar__label">월급</span>
      <strong class="dc-stickybar__price">280만원</strong>
    </div>
    <div class="dc-stickybar__actions">
      <button type="button" class="dc-stickybar__btn dc-stickybar__btn--ghost">저장</button>
      <button type="button" class="dc-stickybar__btn">지원하기</button>
    </div>
  </div>
</div>
.dc-stickyshell { position:relative; display:flex; flex-direction:column; height:300px; overflow:hidden; border:1px solid var(--dc-line); border-radius:var(--dc-r-md); background:var(--dc-bg); font-family:var(--dc-font); }
.dc-stickyshell__page { flex:1 1 auto; overflow-y:auto; padding:var(--dc-4); }
.dc-stickyshell__line { margin:0 0 var(--dc-5); font-size:14px; line-height:1.6; color:var(--dc-text-sub); }
.dc-stickybar { position:sticky; bottom:0; display:flex; align-items:center; justify-content:space-between; gap:var(--dc-4); padding:var(--dc-3) var(--dc-4); padding-bottom:calc(var(--dc-3) + var(--dc-safe-bottom)); border-top:1px solid var(--dc-line); background:var(--dc-surface); box-shadow:var(--dc-sh-2); }
.dc-stickybar__info { display:flex; flex-direction:column; min-width:0; }
.dc-stickybar__label { font-size:12px; color:var(--dc-text-mute); }
.dc-stickybar__price { font-size:17px; font-weight:700; color:var(--dc-text); }
.dc-stickybar__step { font-size:13px; font-weight:600; color:var(--dc-text-sub); }
.dc-stickybar__actions { display:flex; align-items:center; gap:var(--dc-2); flex-shrink:0; }
.dc-stickybar__btn { min-height:44px; padding:0 var(--dc-5); border:1px solid transparent; border-radius:var(--dc-r-sm); background:var(--dc-brand); color:var(--dc-text-on); font-size:15px; font-weight:700; transition:background var(--dc-fast); }
.dc-stickybar__btn:hover { background:var(--dc-brand-hi); }
.dc-stickybar__btn--ghost { min-width:44px; background:var(--dc-surface); border-color:var(--dc-line-field); color:var(--dc-text); }
.dc-stickybar__btn--ghost:hover { background:var(--dc-sunken); }
.dc-stickybar--single { display:block; }
.dc-stickybar--single .dc-stickybar__btn { width:100%; }
@media (max-width:480px) {
  .dc-stickybar { flex-wrap:wrap; }
  .dc-stickybar__actions { flex:1 1 auto; }
  .dc-stickybar__btn { flex:1 1 auto; padding:0 var(--dc-3); }
}

이렇게 씁니다

  • 버튼은 하나, 많아도 둘. 세 개를 넣으면 어느 것이 주 버튼인지 사라진다
  • 버튼만 두지 말고 결정에 필요한 값(금액 · 남은 단계)을 왼쪽에 같이 보인다
  • 가격이나 단계가 바뀌면 바 안의 숫자도 같이 바뀌어야 한다 — 바는 요약이다

주의할 점

  • 아래쪽 여백에 --dc-safe-bottom 을 더한다. 없으면 홈 인디케이터가 버튼을 덮는다
  • 누르는 높이를 44px 아래로 줄이지 않고, 바 뒤에 내용이 비치게 투명하게 두지 않는다
  • 바가 가리는 만큼 본문 아래에 여백을 둔다. 마지막 줄이 바에 깔리면 읽을 수 없다

다음에 볼 것