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