<html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .menu:hover .menucontent{ display: block; } .menucontent{ width: 120px; display: none; text-align: center; border: 1px solid #ddd; } .menu .btn{ display: block; width: 50px; height: 20px; text-align: center; font-size: 14px; background: red; color: #fff; } </style> </head> <body> <div class="menu"> <span class="btn">菜单</span> <div class="menucontent"> <p>hello</p> <p>world</p> <p>helloWorld</p> </div> </div> </body> </html>
原文地址:https://www.cnblogs.com/150536FBB/p/11599339.html
时间: 2024-11-10 01:33:49