日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区
模板無憂
網(wǎng)頁特效
每日更新
|
TOP排行榜
|
Tag標簽
|
充值
無憂首頁
網(wǎng)頁模板
程序模板
建站教程
視頻教程
網(wǎng)頁特效
圖標素材
字體下載
站長工具
站長問答
網(wǎng)頁特效
菜單導航
圖片特效
文本鏈接
層和布局
頁面背景
表單按鈕
日期時間
計算轉(zhuǎn)換
鍵盤鼠標
瀏覽器
游戲娛樂
綜合其它
常用代碼
jQuery特效
Prototype
Ajax/JavaScript
ExtJS
CSS特效
在線編輯器
Mootools
HTML
JS廣告代碼合集
站長工具
站長常用軟件
網(wǎng)站綜合查詢
Alexa排名查詢
Google PR查詢
域名Whois查詢
網(wǎng)站收錄查詢
友情鏈接查詢
CSS2中文手冊
CSS精簡優(yōu)化工具
網(wǎng)頁特效代碼
模板無憂
>
網(wǎng)頁特效
>
瀏覽器特效代碼
>
收藏
分享
查看評論
瀏覽器
演示
圖片代替滾動條_瀏覽器特效
查看演示效果
特效Tag:
滾動條
添加
用圖片代替滾動條,嚴格來說是用JS和CSS虛擬出的框架效果,不少朋友挺喜歡的,不過代碼有點多喲,實用性不知怎么樣。
<html> <head> <title>圖片代替滾動條</title> <meta http-equiv="Content-Type" mrc="text/html; charset=gb2312"> <STYLE type=text/css> #scrollerContent {POSITION: absolute} body {font-size:9pt;color:#660000;text-decoration: none} </STYLE> <script> var upH = 13;//向上的箭頭的高度 var upW = 9; //向上的箭頭的寬度 var downH = 13;//向下的箭頭的高度 var downW = 9;//向下的箭頭的寬度 var dragH = 26; //滾動條的高度 var dragW = 9; //滾動條的寬度 var scrollH =68; //滾動體的高度 var speed =9; //滾動的速度 var dom = document.getElementById ? true:false; var nn4 = document.layers ? true:false; var ie4 = document.all ? true:false; var mouseY; var mouseX; var clickUp = false; var clickDown = false; var clickDrag = false; var clickAbove = false; var clickBelow = false; var timer = setTimeout("",500); var upL; var upT; var downL; var downT; var dragL; var dragT; var rulerL; var rulerT; var mrcT; var mrcH; var mrcClipH; var scrollLength; var startY; function down(e){ if((document.layers && e.which!=1) || (document.all && event.button!=1)) return true; getMouse(e); startY = (mouseY - dragT); if(mouseX >= upL && (mouseX <= (upL + upW)) && mouseY >= upT && (mouseY <= (upT + upH))){ clickUp = true; return scrollUp(); } else if(mouseX >= downL && (mouseX <= (downL + downW)) && mouseY >= downT && (mouseY <= (downT + downH))){ clickDown = true; return scrollDown(); } else if(mouseX >= dragL && (mouseX <= (dragL + dragW)) && mouseY >= dragT && (mouseY <= (dragT + dragH))){ clickDrag = true; return false; } else if(mouseX >= dragL && (mouseX <= (dragL + dragW)) && mouseY >= rulerT && (mouseY <= (rulerT + scrollH))){ if(mouseY < dragT){ clickAbove = true; clickUp = true; return scrollUp(); } else{ clickBelow = true; clickDown = true; return scrollDown(); } } else{ return true; } } function move(e){ if(clickDrag && mrcH > mrcClipH){ getMouse(e); dragT = (mouseY - startY); if(dragT < (rulerT)) dragT = rulerT; if(dragT > (rulerT + scrollH - dragH)) dragT = (rulerT + scrollH - dragH); mrcT = ((dragT - rulerT)*(1/scrollLength)); mrcT = eval('-' + mrcT); moveTo(); if(ie4) return false; } } function up(){ clearTimeout(timer); clickUp = false; clickDown = false; clickDrag = false; clickAbove = false; clickBelow = false; return true; } function getT(){ if(ie4) mrcT = document.all.scrollerContent.style.pixelTop; else if(nn4) mrcT = document.scrollerContentClip.document.scrollerContent.top; else if(dom) mrcT = parseInt(document.getElementById("scrollerContent").style.top); } function getMouse(e){ if(ie4){ mouseY = event.clientY + document.body.scrollTop; mouseX = event.clientX + document.body.scrollLeft; } else if(nn4 || dom){ mouseY = e.pageY; mouseX = e.pageX; } } function moveTo(){ if(ie4){ document.all.scrollerContent.style.top = mrcT; document.all.ruler.style.top = dragT; document.all.drag.style.top = dragT; } else if(nn4){ document.scrollerContentClip.document.scrollerContent.top = mrcT; document.ruler.top = dragT; document.drag.top = dragT; } else if(dom){ document.getElementById("scrollerContent").style.top = mrcT + "px"; document.getElementById("drag").style.top = dragT + "px"; document.getElementById("ruler").style.top = dragT + "px"; } } function scrollUp(){ getT(); if(clickAbove){ if(dragT <= (mouseY-(dragH/2))) return up(); } if(clickUp){ if(mrcT < 0){ dragT = dragT - (speed*scrollLength); if(dragT < (rulerT)) dragT = rulerT; mrcT = mrcT + speed; if(mrcT > 0) mrcT = 0; moveTo(); timer = setTimeout("scrollUp()",25); } } return false; } function scrollDown(){ getT(); if(clickBelow){ if(dragT >= (mouseY-(dragH/2))) return up(); } if(clickDown){ if(mrcT > -(mrcH - mrcClipH)){ dragT = dragT + (speed*scrollLength); if(dragT > (rulerT + scrollH - dragH)) dragT = (rulerT + scrollH - dragH); mrcT = mrcT - speed; if(mrcT < -(mrcH - mrcClipH)) mrcT = -(mrcH - mrcClipH); moveTo(); timer = setTimeout("scrollDown()",25); } } return false; } function reloadPage(){ location.reload(); } function eventLoader(){ if(ie4){ upL = document.all.up.style.pixelLeft; upT = document.all.up.style.pixelTop; downL = document.all.down.style.pixelLeft; downT = document.all.down.style.pixelTop; dragL = document.all.drag.style.pixelLeft; dragT = document.all.drag.style.pixelTop; rulerT = document.all.ruler.style.pixelTop; mrcH = parseInt(document.all.scrollerContent.scrollHeight); mrcClipH = parseInt(document.all.scrollerContentClip.style.height); } else if(nn4){ upL = document.up.left; upT = document.up.top; downL = document.down.left; downT = document.down.top; dragL = document.drag.left; dragT = document.drag.top; rulerT = document.ruler.top; mrcH = document.scrollerContentClip.document.scrollerContent.clip.bottom; mrcClipH = document.scrollerContentClip.clip.bottom; } else if(dom){ upL = parseInt(document.getElementById("up").style.left); upT = parseInt(document.getElementById("up").style.top); downL = parseInt(document.getElementById("down").style.left); downT = parseInt(document.getElementById("down").style.top); dragL = parseInt(document.getElementById("drag").style.left); dragT = parseInt(document.getElementById("drag").style.top); rulerT = parseInt(document.getElementById("ruler").style.top); mrcH = parseInt(document.getElementById("scrollerContent").offsetHeight); mrcClipH = parseInt(document.getElementById("scrollerContentClip").offsetHeight); document.getElementById("scrollerContent").style.top = 0 + "px"; } scrollLength = ((scrollH-dragH)/(mrcH-mrcClipH)); if(nn4){ document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP); window.onresize = reloadPage; } document.onmousedown = down; document.onmousemove = move; document.onmouseup = up; } </script></head> <BODY onload="eventLoader()"> <SPAN id=drag style="LEFT: 203px;POSITION: absolute; TOP: 116px"><IMG height=26 src="slider.gif" width=9 border=1></SPAN> <SPAN id=ruler style="TOP: 116px"></SPAN> <SPAN id=up style="LEFT: 203px; POSITION: absolute; TOP: 100px"><IMG height=13 alt="" src="scrollup.gif" width=9 border=1></SPAN> <SPAN id=down style="LEFT: 203px; POSITION: absolute; TOP: 186px"><IMG height=13 alt="" src="scrolldown.gif" width=9 border=1></SPAN> <SPAN id=scrollerContentClip style=" LEFT: 100; VISIBILITY: visible; OVERFLOW: hidden; WIDTH: 100; CLIP: rect(0px 140px 194px 0px); POSITION: absolute; TOP: 100; HEIGHT: 100;border:#CC6600 1px solid"><SPAN id=scrollerContent style="width: 100; height: 100"> <p></p> <p></p> <p>模板無憂</p> <p>呵呵呵呵</p> <p>呵呵</p> <p>嘿嘿</p> <p>呵呵呵呵</p> <p>mb5u.com</p> <p>呵呵呵</p> <p>哈哈哈 </p> <p>呵呵</p> </SPAN></SPAN> </body> </html>
所屬頻道:
瀏覽器特效
/
更新時間:2013-04-16
[收藏]
[報錯]
[返回列表]
相關(guān)
瀏覽器特效
:
JS判斷客戶端使用的訪問設(shè)備并加載對應CSS
對輸入文本框的內(nèi)容作出檢測
對鏈連接進行確認還能給出有關(guān)提示
檢測瀏覽器去過站點
集成Cookies :能在頁面顯示用戶的很多信息
顯示隨來訪次數(shù)信息
禁用鼠標右鍵:禁用鼠標右鍵功能
離開頁面,提示用戶把本頁添加到收藏夾
禁用鼠標左鍵:禁用鼠標左鍵功能
簽名提示程序:提示用戶簽到,并在頁面給出歡迎語
標題欄里的打字效果
檢測出用戶的IE瀏覽器所裝插件數(shù)
瀏覽器特效Rss訂閱
特效代碼搜索
瀏覽器特效推薦
改變對話框的大小
仿XP關(guān)機效果的彈出窗口功能
JS屏蔽鼠標右鍵的兩種方法
JS獲取所在網(wǎng)頁的文件名
騰訊在線狀態(tài)客服最新代碼
JavaScript設(shè)置、清除Cookies的方法含代碼
狀態(tài)欄的字母象接力棒依次由小寫變大寫
CSS+JS打造帶漸變的進度條
標題欄里的字符左右彈動
去掉網(wǎng)頁滾動條的代碼及實現(xiàn)方法
猜你也喜歡看這些
掃雷
選擇喜歡的女孩子類型噢~
虛擬格式化硬盤
Tic Tac Toe 雙人版
看誰圍的框子多
JavaScript五子棋
滾動條控制的圖片水平展示效果
類似于乒乓球的網(wǎng)頁游戲
21點(黑杰克)
JavaScript 跳跳球效果模擬
相關(guān)鏈接:
復制本頁鏈接
|
搜索圖片代替滾動條
特效說明:
瀏覽器模板
-
圖片代替滾動條
。