💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> *{ padding: 0; margin: 0; } .tab{ width: 600px; height: 500px; border: 4px solid orangered; margin: 30px; position: relative; float: left; } .tab ul li{ float: left; width: 200px; height: 50px; list-style: none; font-size: 30px; line-height: 50px; text-align: center; color: white; } .tab .con{ width: 580px; height: 420px; position: absolute; left: 10px; top: 70px; display: none; } </style> </head> <body> <div class="tab"> <ul> <li style="background: dodgerblue;">新闻</li> <li style="background: orchid;">体育</li> <li style="background: forestgreen;">娱乐</li> </ul> <div class="con" style="background: dodgerblue;display: block;"></div> <div class="con" style="background: orchid;"></div> <div class="con" style="background: forestgreen;"></div> </div> <div class="tab"> <ul> <li style="background: dodgerblue;">新闻</li> <li style="background: orchid;">体育</li> <li style="background: forestgreen;">娱乐</li> </ul> <div class="con" style="background: dodgerblue;display: block;"></div> <div class="con" style="background: orchid;"></div> <div class="con" style="background: forestgreen;"></div> </div> <div class="tab"> <ul> <li style="background: dodgerblue;">新闻</li> <li style="background: orchid;">体育</li> <li style="background: forestgreen;">娱乐</li> </ul> <div class="con" style="background: dodgerblue;display: block;"></div> <div class="con" style="background: orchid;"></div> <div class="con" style="background: forestgreen;"></div> </div> <div class="tab"> <ul> <li style="background: dodgerblue;">新闻</li> <li style="background: orchid;">体育</li> <li style="background: forestgreen;">娱乐</li> </ul> <div class="con" style="background: dodgerblue;display: block;"></div> <div class="con" style="background: orchid;"></div> <div class="con" style="background: forestgreen;"></div> </div> <div class="tab"> <ul> <li style="background: dodgerblue;">新闻</li> <li style="background: orchid;">体育</li> <li style="background: forestgreen;">娱乐</li> </ul> <div class="con" style="background: dodgerblue;display: block;"></div> <div class="con" style="background: orchid;"></div> <div class="con" style="background: forestgreen;"></div> </div> <div class="tab"> <ul> <li style="background: dodgerblue;">新闻</li> <li style="background: orchid;">体育</li> <li style="background: forestgreen;">娱乐</li> </ul> <div class="con" style="background: dodgerblue;display: block;"></div> <div class="con" style="background: orchid;"></div> <div class="con" style="background: forestgreen;"></div> </div> <div class="tab"> <ul> <li style="background: dodgerblue;">新闻</li> <li style="background: orchid;">体育</li> <li style="background: forestgreen;">娱乐</li> </ul> <div class="con" style="background: dodgerblue;display: block;"></div> <div class="con" style="background: orchid;"></div> <div class="con" style="background: forestgreen;"></div> </div> <div class="tab"> <ul> <li style="background: dodgerblue;">新闻</li> <li style="background: orchid;">体育</li> <li style="background: forestgreen;">娱乐</li> </ul> <div class="con" style="background: dodgerblue;display: block;"></div> <div class="con" style="background: orchid;"></div> <div class="con" style="background: forestgreen;"></div> </div> <script src="jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> $(".tab ul li").mouseenter(function(){ var c = $(this).index(); $(this).parents('.tab').find('.con').eq(c).show().siblings('.con').hide(); }) </script> </body> </html>