菜单导航集合
会旋转的菜单导航(经典)
会旋转的菜单导航(经典)
要完成此效果需要两个步骤
第一步:把如下代码加入到<head>区域中
<style>powered by 25175.net
.fly {
color: 336c6c;
font-family: arial;
font-size: 24px;
position: absolute;
visibility: hidden;
z-index: 2;
}
.logo {
font-family: times;
font-size: 48px;
color: blue;
position: absolute;
top: 0px;
left: 70px;
visibility: visible;
z-index: 1;
}
.desc {
text-align: center;
font-family: 楷体_GB2312;
font-size: 18px;
color: #336c6c;
position: absolute;
top: 220px;
left: 140px;
width: 400px;
visibility: hidden;
z-index: 0;
}
BODY {
background: #c0c0c0;
}
A {
color: lime;
}
A:HOVER {
color : yellow;
}
</style>
<script LANGUAGE="JavaScript">
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
function showObject(obj) {
if (ns4) obj.visibility = "show"
else if (ie4) obj.visibility = "visible"
}
function hideObject(obj) {
if (ns4) obj.visibility = "hide"
else if (ie4) obj.visibility = "hidden"
}
function slideLogo(from, to) {
if (from < to) {
company.top = (from += 10);
setTimeout('slideLogo(' + from + ',' + to + ')', 20);
}
else initObjects();
}
function rotateObjects() {
for (var i = 0; i < pos.length; i++) {
pos[i] += inc; objects[i].visibility = 'visible';
objects[i].left = (r * Math.cos(pos[i])) + xoff
objects[i].top = (r * Math.sin(pos[i])) + yoff;
}
rotateTimer = setTimeout("rotateObjects()", 50);
}
function initObjects() {
objects = new Array(fly1, fly2, fly3, fly4);
pos = new Array();
pos[0] = 0;
for (var i = 1; i < objects.length; i++) {
pos[i] = parseFloat(pos[i - 1] + ((2 * pi) / objects.length));
}
rotateObjects();
}
/* Variables for rotating objects */
var objects;
var pos;
var r = 160; // radius
var xoff = 280; // x offset
var yoff = 170; // y offset
var pi = Math.PI; // get pi
var inc = pi / 180; // degrees per rotation cycle
var objects; // objects to be rotated
var pos; // position for objects
</script>
第二步:把如下代码加入到<body>区域中
<div ID="fly1" CLASS="fly"><p>
<a HREF="#" onMouseOver="showObject(desc1)"
onMouseOut="hideObject(desc1)">link 1</a><br>
</p>
</div><div ID="fly2" CLASS="fly"><p>
<a HREF="#" onMouseOver="showObject(desc2)"
onMouseOut="hideObject(desc2)">link 2</a><br>
</p>
</div><div ID="fly3" CLASS="fly"><p>
<a HREF="#" onMouseOver="showObject(desc3)"
onMouseOut="hideObject(desc3)">link 3</a><br>
</p>
</div><div ID="fly4" CLASS="fly"><p>
<a HREF="#" onMouseOver="showObject(desc4)"
onMouseOut="hideObject(desc4)">link 4</a><br>
</p>
</div><div ID="company" CLASS="logo">
<p><small>WELCOME TO Typhoon Start</small></p>
</div><div ID="desc1" CLASS="desc">
<p>link 1的内容 </p>
</div><div ID="desc2" CLASS="desc">
<p>link 2的内容 </p>
</div><div ID="desc3" CLASS="desc">
<p>link 3的内容 </p>
</div><div ID="desc4" CLASS="desc">
<p>link 4的内容 </p>
</div><script LANGUAGE="JavaScript">
/* Simple version detection */
var isNS = (navigator.appName == "netscape" && parseInt(navigator.appVersion) >= 4);
/* They can be used in place
of hidden and visible because on occasion Navigator has problems with the two */
var HIDDEN = (isNS) ? 'hide' : 'hidden';
var VISIBLE = (isNS) ? 'show' : 'visible';
/* Create shortcut variables for different absolutely positioned elements */
var fly1 = (isNS) ? document.fly1 : document.all.fly1.style;
var fly2 = (isNS) ? document.fly2 : document.all.fly2.style;
var fly3 = (isNS) ? document.fly3 : document.all.fly3.style;
var fly4 = (isNS) ? document.fly4 : document.all.fly4.style;
var company = (isNS) ? document.company : document.all.company.style;
var desc1 = (isNS) ? document.desc1 : document.all.desc1.style;
var desc2 = (isNS) ? document.desc2 : document.all.desc2.style;
var desc3 = (isNS) ? document.desc3 : document.all.desc3.style;
var desc4 = (isNS) ? document.desc4 : document.all.desc4.style;
/* Begin the sliding of the company logo */
slideLogo(0, 140);
</script>
| 【内容导航】 | |
| 第1页:完全用CSS实现的中英文双语导航菜单(经典) | 第2页:商业风格的CSS垂直菜单 |
| 第3页:突起的导航栏效果[经典] | 第4页:点击显示的FAQ菜单效果[经典] |
| 第5页:一款DIV+CSS闪动导航条效果(经典) | 第6页:非常酷的CSS菜单效果B(经典) |
| 第7页:非常酷的CSS菜单效果A(经典) | 第8页:会旋转的菜单导航(经典) |
| 第9页:带项目描述的导航菜单(经典) | 第10页:聚合的导航菜单效果(经典) |
| 第11页:整合在IE中的导航条(经典) | 第12页:含下拉菜单的绿色导航条 |
| 第13页:关联菜单(连动菜单) | 第14页:可拖动的导航菜单 |
| 第15页:多级滚动菜单 | 第16页:微软导航菜单 |
| 第17页:鼠标移到文字上自动展开 | 第18页:点击渐显的导航菜单 |
| 第19页:随机网站推荐脚本 | 第20页:网站内快捷键导航 |
| 第21页:左侧导航菜单类似按钮 | 第22页:可移动的导航栏 |
| 第23页:页面顶部多级导航栏 | 第24页:浮动、隐藏的导航菜单 |
| 第25页:上下弹动的导航条 | 第26页:鼠标指向显示次级菜单 |
| 第27页:漂亮的仿flash菜单 | 第28页:滑动的层作菜单导航 |
| 第29页:精彩的跳动菜单效果 | 第30页:类似与QQ的好友/黑名单之类的树型菜单 |
| 第31页:定时改变标题栏的内容 | |
上一篇:状态栏特效集合
下一篇:弹出浏览器的版本信息
|
|
这个浮动导航栏效果如何? www.bj-pingan.cn
(YOYO
,10月23日 15:12
)
很好...
(as
,10月07日
)
晕
(ju
,08月05日
)
1212
(445465
,05月30日
)
