顶部可以折叠的菜单工具栏

<!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>
<title>可以折叠的菜单工具栏</title>
<style>
html,body{margin:0;}
body{ url(img.jpg) repeat-x; }
ha{margin:0 auto;}
img{border:none;}
#fx_topToolbar{position:relative;top:-76px;left:0;margin:0 auto;height:92px;background:#0C3E74; width:700px;text-align:center;}
#fx_topToolbar .shell{ margin:0 auto;padding:13px 0;}
#btn_offOn{position:absolute;bottom:-8px;left:20px;height:24px; width:150px;background:url(img34.gif) no-repeat;}
#btn_offOn a{display:block;zoom:1;height:24px;position:relative;right:-16px;background:url(tip.gif) no-repeat 100% 0;}
</style>
<script>
(JS={
$:function(o){return typeof o=="string"?document.getElementById(o):o},
on:function(o,type,fn){o.attachEvent?o.attachEvent(‘on‘+type,function(){fn.call(o)}):o.addEventListener(type,fn,false);return JS.on},
move:function(who,attr,val,s,fn){
var fm=parseInt(who.style[attr])||0;
clearInterval(who[‘timer_‘+attr]);
var iFx=(function(form,to,s){
return function (){return form+=Math[form<to?‘ceil‘:‘floor‘]((to-form)*(s||0.3))};
})(fm,val,s);
who[‘timer_‘+attr]=setInterval(function (){
var v=iFx();
who.style[attr]=v+‘px‘;

if(v==val){ fn&&fn.call(who);clearInterval(who[‘timer_‘+attr]);};
},18);
}
}).on(window,‘load‘,function (){
var Q=JS.$(‘fx_topToolbar‘);Q.style.top=‘-74px‘;
JS.on(JS.$(‘btn_offOn‘),‘mouseover‘,function(){JS.move(Q,‘top‘,0)})
(Q,‘mouseout‘,function (){Q.outTimer=setTimeout(function(){JS.move(Q,‘top‘,-74)},10)})
(Q,‘mouseover‘,function (){clearTimeout(this.outTimer)});
})
</script>
</head>
<body>
<div id="fx_topToolbar">
<div class="shell">
<a href="#" title=""><img src="1.gif" width="231" height="58" /></a>
<a href="#" title=""><img src="2.gif" width="231" height="58" /></a>
</div>
<div id="btn_offOn"><a href="#" title=""></a></div>
</div>
<div>http://www.999jiujiu.com/</div>
</body>
</html>

时间: 2024-08-03 20:25:47

顶部可以折叠的菜单工具栏的相关文章

jQuery&amp;CSS 顶部和底部固定浮动工具栏 兼容IE6

现在常常能看到一些网站(如:新浪微博和花瓣)导航条或工具栏固定在网页的顶部或其他地方.这样的布局方式,能便于用户点击和“曝光率”,不用每次都要把网页拖动到某个特定位置才能点击或看到. 其实这样的布局方式很早就有,只是没有那么个契机推广开吧.做起来也不复杂,只要设置一个小小的属性“position:fixed”便能完成,最关键的无不呼在于要兼容IE6而已. 首先我们来看HTML代码,是不是超简单?这里提供的只是一个简单的框架,实际应用的时候,只要把想要的元素添加东西就在这区域内加就行. HTML

jq网站顶部定时折叠广告

<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><title>网页顶部定时收起广告jQuery特效 - HoverTree</title><base target="_blank" /><style>a {color:blue;text-decoration:none;}</style><

Android自定义顶部栏及侧滑菜单和fragment+viewpag滑动切换的实现

嘿嘿嘿,关于android滑动的操作,是不是经常都会用到呢. 我肯定也要学习一下啦. https://blog.csdn.net/u013184970/article/details/82882107 https://blog.csdn.net/qq_35820350/article/details/82460376 在网上学习了一下,这两篇文章写的不错. 来看一下效果 共有4各部分 1.自定义顶部栏 2.侧滑菜单 3.弹出菜单 4.标签滑动切换 进入具体实现环节啦 第一 .自定义顶部栏 1.先

多窗体,菜单工具栏

多窗体 主窗体不关程序无法退出. 主要有4点 1.哪个是主窗体 Form2 f2 = new Form2(); f2.Show(); this.Hide(): 打开form2窗口,隐藏form1窗口 问题:主窗体隐藏了,关闭其它窗体后,没有将主窗体显示/关闭,那么程序就关不上了 构造函数传值,将窗体传到另一个窗体中去 2. 2.窗体只能打开一个 创建一个全局的泛型集合,为了放置全部打开的窗体1.在窗体打开之前,判断集合中是否有name一致的窗体,如果有就说明已经打开了,就不要再打开了 bool

C#多窗体和菜单工具栏

多窗体: 1.哪个是主窗体 问题:主窗体隐藏了,关闭其它窗体后,没有将主窗体显示/关闭,那么程序就关不上了 (1).构造函数传值,将窗体传到另一个窗体中去 2.窗体只能打开一个 创建一个全局的泛型集合,为了放置全部打开的窗体 (1).在窗体打开之前,判断集合中是否有name一致的窗体,如果有就说明已经打开了,就不要再打开了 问题:当窗体打开了,关闭后,就无法再次打开了  办法:当窗体关闭时,清除Form1中集合中的此窗体对象记录  问题:当窗体已经打开,再次点击打开按钮,不会将已打开的窗体重新显

纵向折叠二级菜单(无限点击)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html id="Cov" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>lef

纵向折叠二级菜单

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html id="Cov" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>lef

Android获取系统顶部状态栏(StatusBar)与底部工具栏(NavigationBar)的高度

Android一些设备都有上下两条bar,我们可以获取这些bar的信息.下面放上获取高度的代码.代码注释和其他方法有空再放. 原文地址http://www.cnblogs.com/rossoneri/p/4142962.html 获取顶部status bar 高度 private int getStatusBarHeight() { Resources resources = mActivity.getResources(); int resourceId = resources.getIden

Pyqt4学习笔记-菜单工具栏

显示状态栏: #!/usr/bin/python # -*- coding: utf-8 -*- import sys from PyQt4 import QtGui, QtCore class MainWindow(QtGui.QMainWindow): def __init__(self): QtGui.QMainWindow.__init__(self) self.resize(250, 150) self.setWindowTitle('Mainwindow') self.statusB