时间:2021-07-01 10:21:17 帮助过:24人阅读
<!DOCTYPE html> <html> <head> <title>下拉菜单实例</title> <meta charset="utf-8"> <style> .dropdown { position: relative; display: inline-block; } .dropdown-content { display: none; position: absolute; background-color: #f9f9f9; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); padding: 12px 16px; } .dropdown:hover .dropdown-content { display: block; } </style> </head> <body> <h2>鼠标移动后出现下拉菜单</h2> <p>将鼠标移动到指定元素上就能看到下拉菜单。</p> <p class="dropdown"> <span>鼠标移动到我这!</span> <p class="dropdown-content"> <p>Gxl网</p> <p>www.gxlcms.com</p> </p> </p> </body> </html>
相关文章:
CSS 下拉菜单
CSS 下拉菜单详解
简单带下划线跟随效果的CSS3下拉菜单特效
以上就是CSS下拉菜单简单制作方法介绍的详细内容,更多请关注Gxl网其它相关文章!