<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="javascript" type="text/javascript" src="jquery-1.4.2.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
#apDiv1 {
position:fixed;/*fixed;left:auto;top:auto用来实现悬浮的效果*/
left: auto;
top: auto;
bottom:auto;
width: 237px;
height:auto;
z-index: 2;
margin-top:-8px;
margin-left:40px;
text-align:center;
font-size:16px;
font-family:"黑体";
color:#965D28;
background-image:url(../img/bg.png);
}
#menu{
display:none;
}
.daohang div{
height: 30px;
z-index: 2;
margin:0 auto;
text-align:center;
padding-top:5px;
overflow:hidden;
padding-top:10px;
color:965D28;
}
.daohang div:hover{
height:30px;
z-index:2;
margin:0 auto;
background-image:url(../img/menu-hover.png);
text-align:center;
overflow:visible;
color:#fff;
}
.daohang li{
margin-left:237px;
list-style-type:none;
background-color:#D3A23A;
width:160px;
line-height:30px;
color:#422B1D;
position:relative;
top:-40px;
background-image:url(../img/bg.jpg);
border:solid thin;
border-color:#965D28;
z-index:1;
}
.daohang li:hover{
margin-left:237px;
list-style-type:none;
background-color:#D3A23A;
width:160px;
line-height:50px;
color:#fff;
position:relative;
top:-40px;
border:solid thin;
border-color:#965D28;
background-image:url(../img/bg.png);
z-index:1;
}
.daohang a:link,a:visited{
text-decoration:none;
color:#965D28; }
.daohang a:hover{
text-decoration:none;
color:#fff;
} </style> </head> <body>
<script>   
function menuvisible()
{   
$("nav").slideToggle(1500);/*开关*/  
}
</script> <div id="apDiv1" >
<img src="" width="90" />
<nav id="menu">
<div class="daohang" style=" background-color:#630">
<a href="index.html">
<div style=" background-color:#FC0; color:#fff">首页
</div>
</a>
<a href="about us.html" target="_blank"><div>关于我们
</div>
</a> <a href="services.html" target="_blank"><div>咖啡文化
</div></a>
<a href="price list.html" target="_blank"><div>价格清单
</div>
</a>
<a href="contact.html" target="_blank"><div>联系我们
</div></a>
</div>
</nav>
<div style="color:#fff;line-height:35px; background-image:url(img/menu-hover.png); border:solid medium #965D28; margin-top:3px;" onclick="menuvisible()">
<input style="color:#fff; border:none; width:100%; background-color:#630; font-family:'黑体'; font-size:16px; height:100%; line-height:35px;"type="button" value="<--MENU-->" />
</div>
<div style="background-image:url(img/bg.png)"><a href="#"style="text-decoration:none; color:#965D28;line-height:30px;">TOP
</a>
</div>
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
咖啡 </body>
</html>

——————————————————————————————————————————

如何引用jQuery实现下拉列表,点击展开,点击关闭。的更多相关文章

  1. vue实现点击展开,点击收起

    安装vue的步骤在这里就不进行赘述了,下面直接进入正题 首先定义一下data里面的数据: data () { return { toLearnList:[ 'html','css','javascri ...

  2. jquery实现点击展开列表同时隐藏其他列表 js 对象操作 对象原型操作 把一个对象A赋值给另一个对象B 并且对象B 修改 不会影响 A对象

    这篇文章主要介绍了jquery实现点击展开列表同时隐藏其他列表的方法,涉及jquery鼠标事件及节点的遍历与属性操作技巧,具有一定参考借鉴价值,需要的朋友可以参考下 本文实例讲述了jquery实现点击 ...

  3. Content Editor Webpart(一)引用JQuery

    SharePoint里面自带了一个Content Editor Webpart, 使用这个webpart.能够方便的往页面上加入随意的内容(HTML,css, JS).以此来达到往页面加入自己定义内容 ...

  4. listview嵌套gridview,并实现grid元素部分显示以及点击展开与折叠

    原文链接:http://blog.csdn.net/duguju/article/details/49538341 有时我们需要用GridView显示目录列表,有时甚至是二级的,即listview每一 ...

  5. 解决sea.js引用jQuery提示$ is not a function的问题

    在使用sea.js的如下写法引用jQuery文件时, //main.jsdefine(function(require,exports,module){ var $ = require('jquery ...

  6. javascript实现列表的点击展开折叠

    <script> window.onload = function() { //要折叠的区域 var catalog = document.getElementById("div ...

  7. 转 mvc项目中,解决引用jquery文件后智能提示失效的办法

    mvc项目中,解决用Url.Content方法引用jquery文件后智能提示失效的办法   这个标题不知道要怎么写才好, 但是希望文章的内容对大家有帮助. 场景如下: 我们在用开发开发程序的时候,经常 ...

  8. js 点击展开、收起

    //点击展开.收起 window.onload=function(){ var current=document.getElementsByTagName('li')[0]; document.bod ...

  9. discuzx3.1中引用 Jquery报错的解决办法

    我们可以引用jQuery给JQ赋予一个变量var jq = jQuery.noConflict(); 修改成为:<script type="text/javascript"& ...

随机推荐

  1. KPI

    一.综合计划部KPI明细数据查询--xigu用户要求:需显示第三季度,即789三个月的明细数据解决方法:1.查看SSISC:\Users\Administrator\Documents\Visual ...

  2. ide编辑器

    http://wowubuntu.com/markdown/#editor https://netbeans.org/downloads/start.html?platform=windows& ...

  3. Servlet 利用Session实现不重复登录

    import java.io.IOException;import java.io.PrintWriter;import java.util.ArrayList;import java.util.It ...

  4. MATLAB - 运算符

    1.关系运算符用来比较两个数之间的大小关系,在Matlab中的关系运算符包括: <  小于 <= 小于或等于 >        大于 >=      大于或等于 ==     ...

  5. DropDownList的使用,RadioButtonList的使用

    DropDownList的使用之从后台动态获取值 前端aspx代码如下 <asp:DropDownList ID="DDLTypeID" runat="server ...

  6. 获取WINDOW.OPEN url js中的get取值

    function getUrlParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)( ...

  7. HttpServletRequest

    javaweb学习总结(十)——HttpServletRequest对象(一) 一.HttpServletRequest介绍 HttpServletRequest对象代表客户端的请求,当客户端通过HT ...

  8. redis 内存泄露

    http://www.oschina.net/question/2266476_246221 http://stackoverflow.com/questions/24304212/how-to-de ...

  9. java动态加载类和静态加载类笔记

    JAVA中的静态加载类是编译时刻加载类  动态加载类指的是运行时刻加载类 二者有什么区别呢 举一个例子  现在我创建了一个类  实现的功能假设为通过传入的参数调用具体的类和方法 class offic ...

  10. mysql and 和 or 的 优先级和 查询问题

    1. select * from trade where id=1 and cid=1 or pid=2 ; 2. select * from trade where cid=1 or (pid=2 ...