实例
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style> *{margin: 0px;padding: 0px;} #box1{ width: 300px; height: 300px; background-color: #D2691E; text-align: center; display: inline-block; border: dashed; padding-top: 10px; } .box2{ width: 300px; height: 300px; background-color: #FFE4C4; display: inline-block; text-align: center; border: dotted; margin-top: 5px; } .box3{ width: 200px; height: 37px; background-color: #CCC; margin-top: 20px; padding-top: 10px; line-height: 20px; text-align: center; color: blueviolet; } .box4{ width: 95px; height: 100px; background-color: azure; margin-top: 15px; padding-top: 0px; line-height: 20px; text-align: center; border: solid; display: none; } .box3:hover .box4{display: block;} </style> </head> <body> <div id="box1">第一个盒模型</div> <div class="box2">第二个盒模型</div> <div class="box3">导航 鼠标移动上去显示效果 <div class="box4">小菜单</div> </div> <video src=""></video> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例