001-cascade.html 904 B

1234567891011121314151617
  1. <!doctype html>
  2. <html><head><meta charset="utf-8"><title>001 cascade</title>
  3. <style>
  4. html,body{margin:0;padding:0;background:#fff;color:#202020;font-family:sans-serif;font-size:13px}
  5. h1{font-size:20px;margin:10px 0 4px 10px}p{margin:0 0 10px 10px}
  6. .pane{float:left;width:440px;margin-left:10px}.label{background:#eee;padding:4px 6px;margin-bottom:4px}
  7. .stage{background:#fff;padding:8px;border:1px solid #999}
  8. .box{height:60px;background:#2244cc}
  9. #target{background:#cc3333}
  10. </style></head><body>
  11. <h1>001 &middot; cascade</h1>
  12. <p>Both boxes must be red: the id rule beats the class rule.</p>
  13. <div class="pane"><div class="label">A: class + id</div><div class="stage">
  14. <div id="target" class="box special" style="height:60px"></div></div></div>
  15. <div class="pane"><div class="label">B: inline reference</div><div class="stage">
  16. <div style="height:60px;background:#cc3333"></div></div></div>
  17. </body></html>