练习、悬浮标签、导航菜单
@charset "utf-8"; /* CSS Document */ * { margin:0px; } .a { width:100px; height:50px; top:20px; left:20px; background-color:red; position:absolute; overflow:hidden; } .a:hover { overflow:visible;} .aa { width:100px; height:150px; top:50px; left:20px; background-color:black; position:absolute; } .b { width:100px; height:50px; top:50px; left:0px; background-color:blue; position:absolute; overflow:hidden; } .b:hover { overflow:visible;} .bb { width:100px; height:150px; top:0px; left:100px; background-color:blue; position:absolute; } .c { width:100px; height:50px; top:100px; left:0px; background-color:yellow; position:absolute; overflow:hidden; } .c:hover { overflow:visible;} .cc { width:100px; height:150px; top:0px; left:100px; background-color:yellow; position:absolute; } .d { width:100px; height:50px; top:150px; left:0px; background-color:green; position:absolute; overflow:hidden; } .d:hover { overflow:visible;} .dd { width:100px; height:150px; top:0px; left:100px; background-color:green; position:absolute; }
<body> <div class="a"> <div id="aa"> <div class="b"><div class="bb"></div></div> <div class="c"><div class="cc"></div></div> <div class="d"><div class="dd"></div></div> </div> </div> </body> </html>