>
设为首页
>
收藏本站
>
最新电影
首页
运营资讯
今日英语
图形图像
计算机技术
Asp编程
网站结构化
资源共享
休闲娱乐
访问新站
您现在的位置:
首页
=>
后台技术
=>
脚本特效
=>
菜单导航
订阅本栏目
左右交叉合并导航效果
时间: 2007-12-10 09:55:49 阅读次数:2221
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>网页特效代码|ffasp.com|---左右交叉合并导航效果</title> </head> <BODY onload=initiate()> <script> <!-- Beginning of JavaScript - // Edit your messages. You can add as many messages a you like. var message = new Array() message[0]="欢迎光临飞飞Asp乐园!" message[1]="欢迎光临飞飞Asp乐园!" message[2]="欢迎光临国内最大的搜索引擎站点---搜狐!" message[3]="欢迎光临国内最大的游戏站点---第九城市!" // The links of your messages. Be sure that you configure as many links as messages. // If don't want to link your messages write '#' instead of an URL (see last sample). var messageurl = new Array() messageurl[0]="http://../www.sina.com.cn/default.htm" messageurl[1]="http://../www.163.com/default.htm" messageurl[2]="http://../www.sohu.com/default.htm" messageurl[3]="http://../www.the9.com/default.htm" var messagetarget=new Array() messagetarget[0]="_blank" messagetarget[1]="_blank" messagetarget[2]="_blank" messagetarget[3]="_blank" // The width of your textbox (pixels). // Be sure that 'textwidth' is slightly bigger than the 'width' configured inside the stylesheet var textwidth=260 // The height of your textbox (pixels) // Be sure that 'textheight' is slightly bigger than the 'height' configured inside the stylesheet var textheight=75 // Final horizontal position of the textbox: distance to the left margin of the window (pixels) // IMPORTANT: // if you want to center the textbox in the middle of the browser-window then write -1. // If you want to place the textbox on an absolute position // then write the number (for instance 223). var x_finalpos=-1 // Final vertical position of the textbox: distance to the top margin of the window var y_finalpos=20 // Total number of textslices var textslices=10 // Standstill of textbox (seconds) var pausetext=5 // Speed of horizontal gliding var step=10 var pause=40 // Do not edit the variables below this line var x_rightspans=0 var x_leftspans=0 var marginright var marginleft var height_slice=Math.floor(textheight/textslices) var cliptop=0 var clipbottom=cliptop+height_slice var clipleft=0 var clipright=textwidth var spannummer=0 var spannrbefore=0 var i_message=0 pausetext=pausetext*1000 function initiate() { if (document.all) { if (x_finalpos==-1) { x_finalpos=Math.floor(document.body.clientWidth/2)-Math.floor(textwidth/2) } changemessage() } } function changemessage() { for (i=0;i<=textslices-1;i++) { var thisspan=eval("span"+i) thisspan.innerHTML="<a href='"+messageurl[i_message]+"' target='blank'>"+message[i_message]+"</a>" } gostartposition() } function gostartposition() { for (i=0;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft=marginright } for (i=1;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft=marginleft } moveslices_IE() } function moveslices_IE() { if (x_rightspans==0 || x_leftspans==0) { if (x_rightspans==0) { for (i=0;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft-=step } if (thisspan.posLeft<=x_finalpos) { x_rightspans=1 for (i=0;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft=x_finalpos } } } if (x_leftspans==0) { for (i=1;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft+=step } if (thisspan.posLeft>=x_finalpos) { x_leftspans=1 for (i=1;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft=x_finalpos } } } var timer=setTimeout("moveslices_IE()",pause) } else { clearTimeout(timer) x_rightspans=0 x_leftspans=0 i_message++ if (i_message > message.length-1) { i_message=0 } var timer=setTimeout("changemessage()",pausetext) } } // - End of JavaScript - --> </script> <style> A { color : red; text-decoration : none } A:hover { color : white; text-decoration : none } .textbox { font-size : 18; font-family : Verdana; font-style : normal; color : red; border-width : 4; text-align : center; background-color : blue; border-style : solid; padding : 5; height : 65; width : 250; overflow : clip; font-weight : bold; } </style> <script> <!-- Beginning of JavaScript - // Do not edit this script-block if (document.all) { for (i=0;i<=textslices-1;i+=2) { marginright=document.body.clientWidth+50 document.write("<span class='textbox' id='span"+i+"' style='position:absolute;visibility:visible; left:"+marginright+"px;top:"+y_finalpos+"px;clip:rect("+cliptop+"px "+clipright+"px "+clipbottom+"px "+clipleft+"px)'>") document.write("</span>") cliptop+=2*height_slice clipbottom+=2*height_slice } cliptop=height_slice clipbottom=2*height_slice for (i=1;i<=textslices-1;i+=2) { marginleft=-textwidth-50 document.write("<span class='textbox' id='span"+i+"' style='position:absolute;visibility:visible; left:"+marginleft+"px;top:"+y_finalpos+"px;clip:rect("+cliptop+"px "+clipright+"px "+clipbottom+"px "+clipleft+"px)'>") document.write("</span>") cliptop+=2*height_slice clipbottom+=2*height_slice } } // - End of JavaScript - --> </script> <div style="position: absolute; top: -25; left: 9; width: 717; height: 19"> </div></body> </html>
提示:您可以先修改部分代码再运行
飞飞A.sp技术乐园
站内搜索
:
标题
内容
下一篇
绿色透明下拉菜单
上一篇
可以拖动的菜单
本栏目最新
栏目最新列表
使用jquery实现的简单下拉菜单(下拉框)效
简单的下拉菜单效果
div+css能在ie7/ie7/Firefox下运行的菜单导
同一个页面可以多次使用的选项卡
非常酷的菜单管理效果
网站优化策划
栏目最新列表
增加网站外链的快速方法
网站上线前必做的30个检查
新的友情链接参考标准(没有google的PR情况
优化Google的AdSense广告的五个工具
王通讲SEO八大基础
站点最新
站点最新列表
微博推广的一些技巧
xhEditor v1.1.7 发布,
收集的一些轻量级非常实
50个新鲜兼容最新版本的
javascript中cookie的设
Excel中出现#VALUE!、#D
jquery插件:飞飞表情插件
十个使用HTML5开发的精彩
支持HTML5的浏览器有哪些
飞妮莫属:漫画:如何写出
历史最热10条信息
MIME介绍 及
[
1
] [
2
] [
3
]
巧用Google和迅雷来下载
Transact SQL 常
[
1
] [
2
]
VIA Rhine II Fast Ethe
电脑常用端
[
1
] [
2
] [
3
]
Do you get a kick out
十道羊皮卷 欣赏+mp3版+
每日一句:A friend and
每日一句:Theres no tu
经典__悟透JavaScript
伟哥博客
西安房产
123最新电影
三四六四
关于站点
|
免责声明
|
联系站长
|
网站地图
|
陕ICP备07002804号
WEB技术QQ交流群:72840059
©2007 ffasp.com. 版权所有