jsp頁(yè)面
創(chuàng)新互聯(lián)公司是一家集網(wǎng)站建設(shè),烏魯木齊企業(yè)網(wǎng)站建設(shè),烏魯木齊品牌網(wǎng)站建設(shè),網(wǎng)站定制,烏魯木齊網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷,網(wǎng)絡(luò)優(yōu)化,烏魯木齊網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。
- <%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
橫向縱向菜單
- 菜單項(xiàng)1
- 子菜單項(xiàng)11
- 子菜單項(xiàng)12
- 菜單項(xiàng)2
- 子菜單項(xiàng)21
- 子菜單項(xiàng)22
- 菜單項(xiàng)3
- 子菜單項(xiàng)31
- 子菜單項(xiàng)32
- 菜單項(xiàng)1
- 子菜單項(xiàng)11
- 子菜單項(xiàng)12
- 菜單項(xiàng)2
- 子菜單項(xiàng)21
- 子菜單項(xiàng)22
- 菜單項(xiàng)3
- 子菜單項(xiàng)31
- 子菜單項(xiàng)32
css樣式
- ul,li{
- /*清除ul和li上默認(rèn)的小圓點(diǎn)*/
- list-style: none;
- }
- ul {
- /*清除子菜單的縮進(jìn)值*/
- padding: 0;
- margin: 0;
- }
- .main,.hmain {
- background-p_w_picpath: url(../p_w_picpaths/title.gif);
- background-repeat: repeat-x;
- width: 120px;
- }
- li {
- background-color: #EEEEEE;
- }
- a {
- /*取消所有的下劃線*/
- text-decoration: none;
- padding-left: 20px;
- display: block;
- display: inline-block;
- width: 100px;
- padding-top: 3px;
- padding-bottom: 3px;
- }
- .main a, .hmain a {
- color: white;
- background-p_w_picpath: url(../p_w_picpaths/collapsed.gif);
- background-repeat: no-repeat;
- background-position: 3px center;
- }
- .main li a, .hmain li a {
- color: black;
- background-p_w_picpath: none;
- }
- .main ul, .hmain ul {
- display: none;
- }
- .hmain {
- float: left;
- margin-right: 1px;
- }
Jquery代碼
- $(document).ready(function(){
- //頁(yè)面中的DOM已經(jīng)裝載完成時(shí),執(zhí)行的代碼
- $(".main > a").click(function(){
- //找到主菜單項(xiàng)對(duì)應(yīng)的子菜單項(xiàng)
- var ulNode = $(this).next("ul");
- /*
- if (ulNode.css("display") == "none") {
- ulNode.css("display","block");
- } else {
- ulNode.css("display","none");
- }
- */
- //ulNode.show("slow");//normal fast
- //ulNode.hide();
- //ulNode.toggle();
- //
- //ulNode.slideDown("slow");
- //ulNode.slideUp;
- ulNode.slideToggle();
- changeIcon($(this));
- });
- $(".hmain").hover(function(){
- $(this).children("ul").slideDown();
- changeIcon($(this).children("a"));
- },function(){
- $(this).children("ul").slideUp();
- changeIcon($(this).children("a"));
- });
- });
- /**
- * 修改主菜單的指示圖標(biāo)
- */
- function changeIcon(mainNode) {
- if (mainNode) {
- if (mainNode.css("background-p_w_picpath").indexOf("collapsed.gif") >= 0) {
- mainNode.css("background-p_w_picpath","url('p_w_picpaths/expanded.gif')");
- } else {
- mainNode.css("background-p_w_picpath","url('p_w_picpaths/collapsed.gif')");
- }
- }
- }