下面是一个跑马灯效果的JavaScript文档。 Test2_1.html html head script Language="JavaScript" var msg="这是一个跑马灯效果的JavaScript文档"; var interval = 100; var spacelen = 120; var space10=" "; var seq=0; function Scroll() { len = msg.length; window.status = msg.substring(0, seq+1); seq++; if ( seq = len ) { seq = spacelen; window.setTimeou...[ 查看全文 ]
程序代码 !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 meta http-equiv="Content-Type" content="text/html; charset=utf-8" / meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" / title滚动新闻类 - 51js.com - biyuan/title style type="text/css" body { &nbs...[ 查看全文 ]
需要写个滑动展开折叠的效果,搜索到无忧脚本的一篇贴子,稍加修改了下使其在FF也可应用,代码如下: 以下是引用片段: script type="text/javascript" //Url: http://bbs.51js.com/thread-61646-1-1.html //Author: 风云突变 //Modify: 枫岩 var act; function over(s,nMax){ var obj=document.getElementById(s); var h = parseInt(obj.offsetHeight); if (h nMax){ ...[ 查看全文 ]
如果一个网站想某些地方吸引访客的眼球,可以通过很多方式,比如放到网站的banner上,或是为内容添加特别的排版和高亮的颜色,然而除了这些还有个更吸引用户眼球的方法,就是使用视差滚动效果了。 Rimmel London Pressels Poppy Spend HotDot TEDxGUC Costa Flat vs Realism Teapot Creation NASA Prospect Boy Coy The Beast 13 Reasons Inforgraphic Los...[ 查看全文 ]
CSS+Javascript实现新闻滑动文本选项卡显示,在网页中应用选项卡可以使网页显得更紧凑,结合AJAX技术可以使页面在有限的空间内展现更多的内容: 以下是引用片段: !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd" HTMLHEADTITLE绝对经典的滑轮新闻显示(javascript+css)/TITLE META http-equiv=Content-Type content="te...[ 查看全文 ]
!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 meta http-equiv="Content-Type" content="text/html; charset=gb2312" / title精彩推荐/title style type="text/css" !-- body{height:20px;line-height:20px;overflow:hidden;width:550px;margin:0 auto;font-size:14px;backgr...[ 查看全文 ]