1cfd3bbb56
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고, Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
3.2 KiB
3.2 KiB
id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
| id | title | category | status | verification_status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | created_at | updated_at | review_reason | merge_history | tags | raw_sources | applied_in | github_commit | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| howto-css-notification-button | How To - Notification Buttons | Web_Recipes | draft | conceptual |
|
B | 0.82 | 2026-07-04 | 2026-07-04 |
|
|
HOWTO CSS Notification Button
🎯 한 줄 통찰 (One-line insight)
The count badge is positioned with NEGATIVE offsets (top: -10px; right: -10px;) rather than the usual 0/positive values seen in other absolute-positioning recipes — this deliberately pushes the badge PARTLY OUTSIDE the parent button's boundary box, creating the familiar "peeking over the corner" notification-count look, which only works because .notification { position: relative; } gives the badge a positioning anchor to escape from in the first place. [S1]
🧠 핵심 개념 (Core concepts)
position: relativeon the button — establishes the anchor for the badge's absolute positioning, same relative/absolute pairing seen throughout this cookbook. [S1]- Negative
top/rightoffsets —top: -10px; right: -10px;deliberately pushes the badge outside the button's own box, rather than flush against an inner edge. [S1] border-radius: 50%badge — combined with roughly-equal padding to render as a circle around the count number. [S1]
📖 세부 내용 (Details)
.notification { background-color: #555; position: relative; display: inline-block; } .notification .badge { position: absolute; top: -10px; right: -10px; border-radius: 50%; background: red; color: white; }. [S1]
⚖️ 모순 및 업데이트 (Contradictions & updates)
없음 — 신규 레시피, 기존 문서와 모순되는 내용 없음.
🛠️ 적용 사례 (Applied in summary)
"Inbox" 버튼 오른쪽 상단 모서리에 빨간 원형 배지로 "3"을 표시하는 예제가 원문에서 직접 제시됨. [S1]
💻 코드 패턴 (Code patterns)
Notification badge escaping the button's own box via negative offsets (CSS):
.notification { position: relative; display: inline-block; }
.notification .badge {
position: absolute;
top: -10px; right: -10px; /* negative -- pushes outside the button */
border-radius: 50%;
background: red;
color: white;
}
✅ 검증 상태 및 신뢰도
- 상태: draft
- 검증 단계: conceptual
- 출처 신뢰도: B (W3Schools — widely used educational reference)
- 신뢰 점수: 0.82
- 중복 검사 결과: 신규 생성 (New discovery)
🔗 지식 그래프 (Knowledge Graph)
- 상위/루트: W3Schools HOW TO
- 관련 개념: HOWTO CSS Icon Buttons, HOWTO CSS Ribbon
- 참조 맥락: CSS Buttons 섹션.
📚 출처 (Sources)
- [S1] W3Schools — How To - Notification Buttons — https://www.w3schools.com/howto/howto_css_notification_button.asp
📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "How To - Notification Buttons" recipe (Astra wiki-curation, P-Reinforce v3.1 format).