目录
下拉:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <style> * { padding: 0; margin: 0; } ul { list-style: none; } .box { width: 150px; margin: 0 auto; } .box h2 { position: relative; width: 150px; height: 40px; line-height: 40px; text-align: center; background-color: #f00; } .box h2 .sj { position: absolute; top: 14px; right: 20px; width: 0; height: 0; border: 10px solid rgba(0, 0, 0, 0); border-top-color: #222; } .box .list { display: none; width: 150px; height: 200px; box-shadow: 0 0 2px rgba(0, 0, 0, 0.5); } </style> </head> <body> <div class="box"> <h2> 标题 <i class=