温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ul和li导航栏

发布时间:2020-07-25 23:58:25 来源:网络 阅读:314 作者:matengbing 栏目:开发技术

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'test3.jsp' starting page</title>
    
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    <script src="js/jquery-2.1.1.min.js">
        
    </script>
    <style>
        li{
            list-style:none;
            color:blue;
            font-size:12px;
            margin-left:10px;
        }
        ul{
            color:#f1cd23;
            font-size:20px;
            margin:0px;
            padding:1px;
        }
        p{
            width:100px;
            height:25px;
            background-color:#37dddd;
            margin:0px;
            padding:0px;
            border-radius:5px;
            text-align:center;
            
        }
    </style>
  </head>
 
  <body>
    <ul id="ul1">
        <p>1111</p>
        <li>张三</li>
        <li>李四</li>
        <li>王五</li>
    </ul>
     <ul id="ul2">
         <p>2222</p>
        <li>张三</li>
        <li>李四</li>
        <li>王五</li>
    </ul>
     <ul id="ul3">
         <p>3333</p>
        <li>张三</li>
        <li>李四</li>
        <li>王五</li>
    </ul>
  </body>
  <script language="JavaScript">
      $("p").mousemove(function(){
        $(this).parent("ul").find("*").show(500);
        var $p=$(this).parent("ul");
        var $x=$p.siblings();
        $x.find("li").hide(600);
        
    });
    $("p").mouseout(function(){
        $("ul").find("li").hide(600);
    });
  </script>
</html>
ul和li导航栏

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI