可控制导航下拉方向的jQuery下拉菜单代码

效果:http://hovertree.com/texiao/nav/1/代码如下:转自:http://hovertree.com/h/bjaf/kxl2s00m.htm特效:http://www

大家好,又见面了,我是全栈君,今天给大家准备了Idea注册码。

效果:http://hovertree.com/texiao/nav/1/

代码如下:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>可控制导航下拉方向的jQuery下拉菜单代码 - 何问起</title>
<base target="_blank" />
<style>
.nav * {
margin: 0;
padding: 0;
list-style: none;
}

.nav {
width: 700px;
height: 30px;
line-height: 30px;
margin: 2px auto;
}

.nav li a {
color: #fff;
text-decoration: none;
display: block;
float: left;
height: 30px;
line-height: 30px;
padding: 0px 15px;
font-size: 12px;
background: #636871;
}

.nav li a:hover {
background: #4b505a;
}

.nav li {
float: left;
position: relative;
height: 30px;
line-height: 30px;
}

.nav li .second {
position: absolute;
left: 0;
display: none;
}

.hovertreeinfo {
width: 100%;
height: 234px;
text-align: center;
}

.hovertreeinfo a {
color: blue;
}
</style>

</head>
<body>
<div class="hovertreeinfo">
<h1>jQuery上弹菜单</h1>
<a href="http://hovertree.com/h/bjaf/kxl2s00m.htm">原文</a> <a href="http://hovertree.com">首页</a> <a href="http://hovertree.com/texiao/">特效</a> <a href="http://hovertree.com/texiao/keleyi/">推荐</a>
<a href="http://hovertree.com/texiao/nav/1/1.htm">Demo 2</a>
</div>
<ul class="nav">
<li>
<a href='http://hovertree.com/'>首页</a>
<div class="second">
<a href='http://hovertree.com/texiao/'>特效</a>
<a href='http://hovertree.com/map/'>导航</a>
<a href='http://hovertree.com/hvtart/bjae/5w5svpu4.htm'>菜单</a>
<a href='http://hovertree.com/h/bjae/0st5ww13.htm'>磨砂</a>
</div>
</li>
<li>
<a href='http://hovertree.com/h/bjaf/qufo9d03.htm'>菜单导航</a>
<div class="second">
<a href='http://keleyi.com/'>柯乐义</a>
<a href='http://hovertree.com/code/css/uofyn8bc.htm'>何问起</a>
<a href='http://hovertree.com/texiao/jeasyui/2/'>EasyUI</a>
<a href='http://hovertree.com/texiao/keleyi/'>Keleyi</a>
</div>
</li>
<li>
<a href='http://hovertree.com/h/bjaf/citydate.htm'>时间日期</a>
<div class="second">
<a href='http://hovertree.com/h/bjaf/jshour.htm'>时间日期</a>
<a href='http://hovertree.com/code/javascript/sqchrhfe.htm'>时间日期</a>
<a href='http://hovertree.com/h/bjaf/p49wvx4e.htm'>时间日期</a>
<a href='http://hovertree.com/h/bjaf/46xrokmy.htm'>时间日期</a>
</div>
</li>
<li>
<a href='http://hovertree.com/hvtart/bjae/yqhu1ug9.htm'>焦点图</a>
<div class="second">
<a href='http://hovertree.com/h/bjaf/8c5uhche.htm'>焦点图</a>
<a href='http://hovertree.com/hvtart/bjae/f03e85410878db53.htm'>焦点图</a>
<a href='http://hovertree.com/code/jquery/smjv6d0n.htm'>焦点图</a>
<a href='http://hovertree.com/h/bjaf/a6598spx.htm'>焦点图</a>
</div>
</li>
<li>
<a href='http://hovertree.com/h/bjaf/sk1tputv.htm'>tab标签</a>
<div class="second">
<a href='http://hovertree.com/hvtart/bjae/wokffp10.htm'>tab标签</a>
<a href='http://hovertree.com/h/bjae/9glhm7lv.htm'>tab标签</a>
<a href='http://hovertree.com/h/bjaf/uoarumwr.htm'>tab标签</a>
<a href='http://hovertree.com/h/bjaf/s6y2vlsx.htm'>tab标签</a>
</div>
</li>
<li>
<a href='http://hovertree.com/h/bjaf/gundong.htm'>jquery特效</a>
<div class="second">
<a href='http://hovertree.com/h/bjaf/picqiehuan.htm'>jquery特效</a>
<a href='http://hovertree.com/h/bjaf/41eyinh2.htm'>jquery特效</a>
<a href='http://hovertree.com/h/bjaf/vc8993j8.htm'>jquery特效</a>
<a href='http://hovertree.com/h/bjaf/6sm1esjw.htm'>jquery特效</a>
</div>
</li>
<li>
<a href='http://hovertree.com/hvtart/bjae/yjm6v683.htm'>在线客服</a>
<div class="second">
<a href='http://hovertree.com/h/bjaf/mbrpxe4o.htm'>在线客服</a>
<a href='http://hovertree.com/h/bjaf/tishiceng.htm'>在线客服</a>
<a href='http://hovertree.com/h/bjaf/1kquypy7.htm'>在线客服</a>
<a href='http://hovertree.com/h/bjaf/5mkg51yt.htm'>在线客服</a>
</div>
</li>
<li>
<a href='http://hovertree.com/h/bjaf/3dxfknkj.htm'>广告代码</a>
<div class="second">
<a href='http://hovertree.com/h/bjaf/c03itibx.htm'>广告代码</a>
<a href='http://hovertree.com/h/bjaf/kqud99m6.htm'>广告代码</a>
<a href='http://hovertree.com/h/bjaf/ajw4dsfb.htm'>广告代码</a>
<a href='http://hovertree.com/h/bjaf/ws50ueia.htm'>广告代码</a>
</div>
</li>
<li>
<a href='http://hovertree.com/h/bjaf/l3c6nm7b.htm'>相册代码</a>
<div class="second">
<a href='http://hovertree.com/hvtart/bjae/upnrkt1d.htm'>相册代码</a>
<a href='http://hovertree.com/h/bjaf/gk8mko69.htm'>相册代码</a>
<a href='http://hovertree.com/texiao/css/23/'>相册代码</a>
<a href='http://hovertree.com/texiao/html5/30/'>相册代码</a>
</div>
</li>
</ul>
<div class="hovertreeinfo"></div>

<script type="text/javascript" src="http://down.hovertree.com/jquery/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
$(function () {
var nav = 1; // 默认值为0,二级菜单向下滑动显示;值为1,则二级菜单向上滑动显示
if (nav == 0) {
$('.nav li').hover(function () {
$('.second', this).css('top', '30px').show();
}, function () {
$('.second', this).hide();
});
} else if (nav == 1) {
$('.nav li').hover(function () {
$('.second', this).css('bottom', '30px').show();
}, function () {
$('.second', this).hide();
});
}
});
</script>
</body>
</html>

转自:http://hovertree.com/h/bjaf/kxl2s00m.htm

特效:http://www.cnblogs.com/roucheng/p/texiao.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/120558.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Android启动模式FLAG_ACTIVITY_CLEAR_TOP

    Android启动模式FLAG_ACTIVITY_CLEAR_TOP关于这个问题,我试了一下。例:A,B,C,D四个Activity,启动模式均为默认,依次启动,在D中启动B。添加intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)效果:C会被清除出栈;然后B被finish掉,重新启动;D被销毁。重走生命周期,不会走onNewIntent()方法Intentintent=newIntent(this,TestBActivity.class);intent.setFlags(Intent.FLAG_AC

    2022年7月17日
    18
  • Enterprise Library概述

    Enterprise Library概述Webcast网络讲座:企业库系统课程企业库(EnterpriseLibrary)是微软的模式与实践(Patterns&Practices)的下一代应用程序块(ApplicationBlocks)。该企业库的设计思想是为了协助开发商解决企业级应用开发过程中所面临的一系列共性的问题,如安全(Security)、日志(Logging)、数据访问(DataA…

    2022年10月20日
    0
  • Eclipse 运行时弹出A Java Exception has occurred

    Eclipse 运行时弹出A Java Exception has occurred错误原因:较高版本的JDK编译的javaclass文件试图在较低版本的JVM上运行而产生的错误。首先,因为之前jdk版本是10,后来安装了jdk1.7,想用1.7的,但是由于eclipse的编译器中仍然使用原来的版本所以导致错误。因为我用的eclipse的编译器来编译的。因为很多编译器都自带javac,而不是采用操作系统中的编译器。如果你的编译器是eclipse的话,那么需要在项目的属性里设置j…

    2022年7月14日
    19
  • mysql截取前几个字符串_mysql 截取字符串 函数[通俗易懂]

    mysql截取前几个字符串_mysql 截取字符串 函数[通俗易懂]文章摘取自http://www.cnblogs.com/zdz8207/p/3765073.html练习截取字符串函数(五个)mysql索引从1开始一、mysql截取字符串函数1、left(str,index)从左边第index开始截取2、right(str,index)从右边第index开始截取3、substring(str,index)当index>0从左边开始截取直到结束当ind…

    2022年6月9日
    92
  • Linux(centos7)离线安装Kubernetes1.19.2和docker——images导入导出

    Linux(centos7)离线安装Kubernetes1.19.2和docker——images导入导出

    2021年5月15日
    243
  • python官网下载步骤64位-windows下载并安装Python的具体步骤

    python官网下载步骤64位-windows下载并安装Python的具体步骤安装Python下载并安装PythonPython的官网是www.python.org,我们可以直接从官网下载Python。这里介绍在微软Windows和苹果MacOS两种系统中的安装方式。如果Python官网页面之后有所更新,那请大家用自己的思维能力和观察力,大胆地尝试,推测如何下载安装,解决问题。1.5.1Windows系统进入https://www.python.org/页面,选…

    2022年6月3日
    66

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号