使用图片制作网页滚动条


以前我们也介绍过使用CSS自定义IE的滚动条效果,如果想替换成使用图片制作滚动条,又该如何操作?这里参照一下预览页面,简单介绍一下制作的方法:
  1、以Iframe制作页面,主页930.htm,Iframe页面930_demo.htm,930.htm中引入子页:<IFRAME name=iii src="http://www.blue1000.com/article/930_demo.htm" frameBorder=0 width="80%" scrolling=no height=250></IFRAME>
  注意需要将页面默认的滚动条关闭:scrolling=no
  2、建立930_demo.htm页面,在<head>中插入scroll.js文件:<SCRIPT src=http://www.blue1000.com/article/"./930/scroll.js"></SCRIPT>
  Scroll.js文件下载
  3、在<body>中加入代码:
<body style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; BORDER-LEFT: 0px; PADDING-TOP: 0px; BORDER-BOTTOM: 0px" onload=langth() onresize=langth() onmouseup="scr.style.filter='alpha(opacity=100)';scrH.style.filter='alpha(opacity=100)';st=0;clearInterval(upm);clearInterval(downm);clearInterval(leftm);clearInterval(rightm);" onmousemove=scrollit() onmousedown=bu() scroll=no>
  注意也需要将930_demo.htm默认的滚动条关闭:scrolling=no
  4、相应插入下面的代码:
<div oncontextmenu="return false" onMouseDown=scrollitfa() id=scrb
style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; PADDING-LEFT: 0px; RIGHT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; OVERFLOW: hidden; BORDER-LEFT: 0px; WIDTH: 12pt; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; HEIGHT: 100%; BACKGROUND-COLOR: #999999"><img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; RIGHT: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; TOP: 0px; magin: 0"
height="100%" src="930/vb.jpg" width="100%"> <img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; RIGHT: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; TOP: 12pt; magin: 0"
height=8 src="930/vbu.jpg" width="100%"> <img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; RIGHT: 0px; BORDER-LEFT: 0px; BOTTOM: 12pt; BORDER-BOTTOM: 0px; POSITION: absolute; magin: 0"
height=8 src="930/vbd.jpg" width="100%"> <img
onMouseDown="upm=setInterval('upmain()',1)" id=scru
style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; PADDING-LEFT: 0px; RIGHT: 0px; PADDING-BOTTOM: 0px; BORDER-LEFT: 0px; WIDTH: 12pt; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 12pt; magin: 0"
src="930/up.jpg">
<div onMouseDown="find();this.style.filter='alpha(opacity=90)'" id=scr
style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; PADDING-LEFT: 0px; RIGHT: 0px; PADDING-BOTTOM: 0px; BORDER-LEFT: 0px; WIDTH: 12pt; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; TOP: 9pt; magin: 0"><img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; RIGHT: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; TOP: 0px; magin: 0"
height="100%" src="930/vs.jpg" width="100%"> <img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; RIGHT: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; TOP: 0px; magin: 0"
height=8 src="http://www.blue1000.com/article/930/vsu.jpg" width="100%"> <img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; RIGHT: 0px; BORDER-LEFT: 0px; BOTTOM: -1px; BORDER-BOTTOM: 0px; POSITION: absolute; magin: 0"
height=8 src="930/vsd.jpg" width="100%"> </div>
<img
onMouseDown="downm=setInterval('downmain()',1)" id=scrd
style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; PADDING-LEFT: 0px; RIGHT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; BORDER-LEFT: 0px; WIDTH: 12pt; BOTTOM: 0px; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; HEIGHT: 12pt"
src="930/down.jpg"> </div>
<div oncontextmenu="return false" onMouseDown=scrollitfaH() id=scrbH
style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; OVERFLOW: hidden; BORDER-LEFT: 0px; WIDTH: 100%; BOTTOM: 0px; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; HEIGHT: 12pt; BACKGROUND-COLOR: #999999"><img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; RIGHT: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; TOP: 0px; magin: 0"
height="100%" src="930/hb.jpg" width="100%"> <img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; LEFT: 12pt; BORDER-LEFT: 0px; BOTTOM: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; magin: 0"
height="100%" src="930/hbl.jpg" width=8> <img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; RIGHT: 12pt; BORDER-LEFT: 0px; BOTTOM: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; magin: 0"
height="100%" src="930/hbr.jpg" width=8> <img
onMouseDown="leftm=setInterval('leftmain()',1)" id=scrlH
style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; PADDING-LEFT: 0px; LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; BORDER-LEFT: 0px; WIDTH: 12pt; BOTTOM: 0px; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; POSITION: relative; HEIGHT: 12pt"
src="930/left.jpg">
<div onMouseDown="findH();this.style.filter='alpha(opacity=90)'" id=scrH
style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; PADDING-LEFT: 0px; LEFT: 9pt; PADDING-BOTTOM: 0px; BORDER-LEFT: 0px; BOTTOM: 0px; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; HEIGHT: 12pt; magin: 0"><img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; RIGHT: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; TOP: 0px; magin: 0"
height="100%" src="930/hs.jpg" width="100%"> <img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; LEFT: 0px; BORDER-LEFT: 0px; BOTTOM: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; magin: 0"
height="100%" src="930/hsl.jpg" width=8> <img
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; RIGHT: 0px; BORDER-LEFT: 0px; BOTTOM: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; magin: 0"
height="100%" src="930/hsr.jpg" width=8> </div>
<img
onMouseDown="rightm=setInterval('rightmain()',1)" id=scrrH
style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; PADDING-LEFT: 0px; RIGHT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; BORDER-LEFT: 0px; WIDTH: 12pt; BOTTOM: 0px; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; HEIGHT: 12pt"
src="930/right.jpg"> </div>
<img oncontextmenu="return false" id=fk
style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; PADDING-LEFT: 0px; RIGHT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; BORDER-LEFT: 0px; WIDTH: 12pt; BOTTOM: 0px; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; HEIGHT: 12pt"
src="930/fk.jpg">
<div id=main1
style="BORDER-RIGHT: #ffffff 1px; PADDING-RIGHT: 0px; BORDER-TOP: #ffffff 1px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; OVERFLOW: hidden; BORDER-LEFT: #ffffff 1px; PADDING-TOP: 0px; BORDER-BOTTOM: #ffffff 1px; POSITION: absolute; BACKGROUND-COLOR: #ffffff; layer-background-color: #ffffff">
<div id=main
style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; BORDER-LEFT: 0px; COLOR: #ffffff; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; POSITION: relative; BACKGROUND-COLOR: #ffffff">
<table cellspacing=0 cellpadding=0 width="700" align=center
border=0>
<tbody>
<tr>
<td class="cn"> <font color="#000000"> “织梦幻影”为站点互动学院(http://favorites.myrice.com)的最新版本。我们在汲取前版本制作经验的基础上,加以新技术,摒除前版本内容杂、管理烦、更新慢的缺点,全新制作了新的版本
─ 织梦幻影。<br>
  新站点主要收集网络技术、网站制作的教学文章,定位于初、中级网站设计制作人员,提供更新、更好、更为丰富的文章,给您制作、设计 本文作者:



相关阅读:
锁的问题
条件 CSS的使用
jquery插件之easing使用
Java教程:如何实现FTP功能
兼容IE、FireFox、Chrome等浏览器的xml处理函数js代码
MySQL数据库的临时文件究竟储存在哪里
优化MySQL数据库性能的十个参数
javascript通过按钮实现超链接
ASP下存储过程编写入门全接触
如何删除Windows2003的wmpub文件夹
论坛里点击别人帖子下面的回复,回复标题变成“回复 24# 的帖子”
利用计划任务和VBS脚本实现自动WEB共享文件夹里的文件
Oracle数据库返回cursor问题的解决方法
WordPress文章摘要小记
快速导航

Copyright © 2016 phpStudy | 皖ICP备18014864号-4