随滚动条移动的层
作者:不详 来源:aa25收集 【大 中 小】 浏览: 修改日期:2008-06-17 我要评论(10)
标准之路www.aa25.cn 提示:可以先修改部分代码后再运行
(如果您觉得本站不错,请告诉身边的朋友,或转载到论坛、百度知道、贴吧等,记得带网址哟,不胜感激!)
〖DIV+CSS教程〗Tags: 安全 {226}
相关文章
更多评论(10)..会员评论
- zengzhit05(220.112.*.*) 发表于:2010-11-17 09:38:35
- 遨游3 也没滚动。 那个... 加油呀 哦耶!
- 管理员回复:好像只支持IE呀
- shrsoon(221.234.*.*) 发表于:2010-11-16 15:54:59
- 我一直想学用图片样子代替滚动条的样子方法,让滚动条更好看更加自定义化。在网上找了很多,全是没有什么注释的长篇的代码,要是老师能写一个文章或视频就太好了!想信一定会很受欢迎.
- 管理员回复:本站有相关的例子
- luzhu(218.8.*.*) 发表于:2010-04-12 16:27:32
- <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <script language="javascript"> var chushi=0; function move() { document.getElementById("Layer1").style.pixelTop=chushi+document.body.scrollTop; document.getElementById("Layer2").style.pixelTop=chushi+document.body.scrollTop; } window.onscroll=move; </script> </head> <body> <table width="443" height="164" border="1"> <tr> <td><img src="../javascript-l3-images/images/content2.jpg" width="998" height="535"> <div id="Layer2" style=" position:absolute; width:400px; height:258px; z-index:2; left: 614px; top: 23px;"><img src="../javascript-l3-images/images/lady_0007.jpg" width="400" height="258"></div> <img src="../javascript-l3-images/images/top.jpg" width="985" height="492"> <div id="Layer1" style="position:absolute; width:400px; height:258px; z-index:1; left: 46px; top: 25px;"><img src="../javascript-l3-images/images/lady_0007.jpg" width="400" height="258"></div></td> </tr> </table> </body> </html> 这样也可以
- luzhu(218.8.*.*) 发表于:2010-04-12 16:26:11
- <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <script language="javascript"> var chushi=0; function move() { document.getElementById("Layer1").style.pixelTop=chushi+document.body.scrollTop; document.getElementById("Layer2").style.pixelTop=chushi+document.body.scrollTop; } window.onscroll=move; </script> </head> <body> <table width="443" height="164" border="1"> <tr> <td><img src="../javascript-l3-images/images/content2.jpg" width="998" height="535"> <div id="Layer2" style=" position:absolute; width:400px; height:258px; z-index:2; left: 614px; top: 23px;"><img src="../javascript-l3-images/images/lady_0007.jpg" width="400" height="258"></div> <img src="../javascript-l3-images/images/top.jpg" width="985" height="492"> <div id="Layer1" style="position:absolute; width:400px; height:258px; z-index:1; left: 46px; top: 25px;"><img src="../javascript-l3-images/images/lady_0007.jpg" width="400" height="258"></div></td> </tr> </table> </body> </html> 这样也可以滚动
- 123(183.0.*.*) 发表于:2010-04-07 00:49:45
- 我想只要运行右上角一部分作为广告框就行了.因此在<body>中增加如下代码,可是它只显示在左上角,而且不会随拖动而滚动. <div id="Javascript.Div4" class="div" style="width: 240px; height:90px" align="center">右上...</div> <SCRIPT LANGUAGE="JavaScript"> function sc4(){ document.getElementById("Javascript.Div4").style.top=(document.documentElement.scrollTop)+"px"; document.getElementById("Javascript.Div4").style.left=(document.documentElement.scrollLeft+document.documentElement.clientWidth-document.getElementById("Javascript.Div4").offsetWidth)+"px"; } </SCRIPT>
- 管理员回复:<SCRIPT LANGUAGE="JavaScript"> <!-- function scall(){ sc4(); } window.onscroll=scall; window.onresize=scall; window.onload=scall; //--> </SCRIPT> 这部分代码也不能去,而且要把sc1();sc2();sc3();sc4();sc5();改为sc4();
- hello(218.18.*.*) 发表于:2010-02-11 10:51:31
- google浏览器不支持- -... 有解不...
- 合肥菜鸟(218.23.*.*) 发表于:2010-01-12 09:24:20
- 有些JS代码看不怎么懂哎,这个效果是不是就像一些网站上的小滚动窗口?可不可以用CSS滤镜实现这个效果?或者可以说比这个效果更好的?
- 管理员回复:这个是需要配合js来实现的
- 王妃(119.7.*.*) 发表于:2009-11-05 20:13:41
- 好像还有更简单的方法可以让图片随滚动条移动,不需要那么多复杂的JS代码的,站长能不能想想办法再简化一下啊?
- 管理员回复:偶对JS了解也不多呀,没这个能力
推荐文章
热门文章
最新评论文章
推荐专题
在线交流QQ群
- 106310407(开)
- 55427134(开)
- 2993401(开)
- 30235673(开)
- 33424604(开)
- 2993401(开)
- 161512108(开)
- 161510519(开)
- 158375021(开)
- 155858414(开)
- 143309878(开)
- 16373807(开)
- 129098721(开)
- 123473199(开)
- 146991009(开)
- 135792800(开)
