Files
2nd/10_Wiki/Dev/Topic_W3CSS/W3CSS_Dropdowns.md
T
Antigravity Agent 1cfd3bbb56 docs(10_Wiki): 위키 구조 정리 — 언어 튜토리얼 카테고리 폴더 제거 + 신규 자산 동기화
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고,
Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
2026-07-05 00:10:59 +09:00

4.5 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
w3css-dropdowns W3CSS Dropdowns Programming_Language draft conceptual
w3-dropdown-hover
w3-dropdown-click
W3.CSS 드롭다운
B 0.87 2026-07-04 2026-07-04
w3css
css-framework
w3schools
dropdown
navigation
https://www.w3schools.com/w3css/w3css_dropdowns.asp

W3CSS Dropdowns

🎯 한 줄 통찰 (One-line insight)

w3-dropdown-hover and w3-dropdown-content place NO constraint on element type — the source explicitly demonstrates the exact same dropdown behavior using <button>+<div>, then <p>+<span>, proving the pattern is a pure CSS relationship (hover state on parent reveals a positioned child), not tied to any specific semantic markup. [S1]

🧠 핵심 개념 (Core concepts)

  • w3-dropdown-hover — marks an element as a hoverable dropdown trigger; any element type works. [S1]
  • w3-dropdown-content — the content revealed on hover/click; hidden by default, shown via CSS :hover or JS-toggled class. [S1]
  • w3-dropdown-click — clickable variant; requires JavaScript to explicitly toggle a w3-show class since there's no :hover state to rely on. [S1]
  • w3-show — the class JS toggles on/off to reveal/hide click-based dropdown content. [S1]
  • Animation composability — any w3-animate-* class can be added directly to w3-dropdown-content for a fade/zoom/slide reveal. [S1]
  • Right-aligned positioning — combining w3-right (float) with inline right:0 CSS makes the dropdown content open right-to-left instead of left-to-right. [S1]

📖 세부 내용 (Details)

  • Hover dropdown with any element types: <p class="w3-dropdown-hover">Hover over me!<span class="w3-dropdown-content w3-green">Hello World!</span></p>. [S1]
  • Click dropdown with JS toggle: <div class="w3-dropdown-click"><button onclick="myFunction()" class="w3-button w3-black">Click Me!</button><div id="Demo" class="w3-dropdown-content w3-bar-block w3-border">...</div></div> with function myFunction() { var x = document.getElementById("Demo"); if (x.className.indexOf("w3-show") == -1) { x.className += " w3-show"; } else { x.className = x.className.replace(" w3-show", ""); } }. [S1]
  • Animated dropdown content: <div id="Demo" class="w3-dropdown-content w3-bar-block w3-animate-zoom">. [S1]

⚖️ 모순 및 업데이트 (Contradictions & updates)

  • hover vs click 방식의 근본적 차이: w3-dropdown-hover는 순수 CSS :hover로 동작하지만 w3-dropdown-click은 JavaScript로 w3-show 클래스를 수동 토글해야 한다는 구조적 차이가 있음. [S1]

🛠️ 적용 사례 (Applied in summary)

현재 발견된 실제 적용 사례가 없습니다 — 네비게이션 바 안에 드롭다운 메뉴를 넣는 조합이 다음 챕터(Navigation Bars)에서 본격적으로 다뤄지는 실전 활용의 시작점이다. [S1]

💻 코드 패턴 (Code patterns)

Clickable dropdown toggled via JavaScript's w3-show class (HTML/JS):

<div class="w3-dropdown-click">
  <button onclick="myFunction()" class="w3-button w3-black">Click Me!</button>
  <div id="Demo" class="w3-dropdown-content w3-bar-block w3-border">
    <a href="#" class="w3-bar-item w3-button">Link 1</a>
  </div>
</div>
<script>
function myFunction() {
  var x = document.getElementById("Demo");
  if (x.className.indexOf("w3-show") == -1) {
    x.className += " w3-show";
  } else {
    x.className = x.className.replace(" w3-show", "");
  }
}
</script>

검증 상태 및 신뢰도

  • 상태: draft
  • 검증 단계: conceptual
  • 출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)
  • 신뢰 점수: 0.87
  • 중복 검사 결과: 신규 생성 (New discovery)

🔗 지식 그래프 (Knowledge Graph)

📚 출처 (Sources)

📝 변경 이력 (Change history)

  • 2026-07-04: Initial draft synthesized from the W3Schools "W3.CSS Dropdowns" page (Astra wiki-curation, P-Reinforce v3.1 format).