模板無憂
網頁特效
每日更新
|
TOP排行榜
|
Tag標簽
|
充值
無憂首頁
網頁模板
程序模板
建站教程
視頻教程
網頁特效
圖標素材
字體下載
站長工具
站長問答
網頁特效
菜單導航
圖片特效
文本鏈接
層和布局
頁面背景
表單按鈕
日期時間
計算轉換
鍵盤鼠標
瀏覽器
游戲娛樂
綜合其它
常用代碼
jQuery特效
Prototype
Ajax/JavaScript
ExtJS
CSS特效
在線編輯器
Mootools
HTML
JS廣告代碼合集
站長工具
站長常用軟件
網站綜合查詢
Alexa排名查詢
Google PR查詢
域名Whois查詢
網站收錄查詢
友情鏈接查詢
CSS2中文手冊
CSS精簡優化工具
網頁特效代碼
模板無憂
>
網頁特效
>
表單按鈕特效代碼
>
收藏
分享
查看評論
表單按鈕
演示
拖動條改變圖片大小_表單按鈕特效
查看演示效果
特效Tag:
滾動條
添加
拖動條改變圖片大小,通過左右拖拉滾動條,使指定圖片按比例放大或縮校
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv=Content-Type mrc="text/html;charset=gb2312"> <title>拖動條改變圖片大小</title> <style> *{margin:0;padding:0;font-size:12px;} .btn{width:50px;height:15px;cursor:pointer;} #picViewPanel{margin:5 50 0 50px; width:278px; height:200px;overflow:auto;text-align:center;border:solid 1px #cccccc;} #slider{margin:0 50px;height:15px;width:278px;border:1px solid #000000;position:relative;} #sliderLeft{height:13px; width:13px;float:left;border:1px solid #cccccc;cursor:pointer;} #sliderBlock{height:13px;width:50px;border:1px solid #cccccc;position:absolute;top:0;left:113px;cursor:pointer;background:#cccccc;text-align:center;} #sliderRight{height:13px;width:13px;float:right;border:1px solid #cccccc;cursor:pointer;} </style> </head> <body> <div id="picViewPanel"></div> <div id="slider"> <span id="sliderLeft" ><<</span> <span id="sliderRight">>></span> <span id="sliderBlock">==</span> </div> </body> <script> //golbal var pv = null; var sd = null; window.onload=function(){ pv = new PicView("http://www.wf0088.com/images/logo.gif"); sd = new Slider( function(p){ document.getElementById("sliderBlock").innerHTML = 2*p +"%"; pv.expand(2*p/100); },function(){}); } var PicView = function(url,alt){ this.url=url; this.obj=null; this.alt=alt?alt:""; this.realWidth=null; this.realHeight=null; this.zoom=1; this.init(); } PicView.prototype.init=function(){ var _img=document.createElement("img"); _img.src = this.url; _img.alt = this.alt; _img.style.zoom = this.zoom; document.getElementById("picViewPanel").appendChild(_img); this.obj=_img; this.realWidth=_img.offsetWidth; this.realHeight=_img.offsetHeight; } PicView.prototype.reBind=function(){ this.obj.style.width = this.realWidth*this.zoom+"px"; this.obj.style.height = this.realHeight*this.zoom+"px"; //this.obj.style.zoom = this.zoom; } PicView.prototype.expand=function(n){ this.zoom=n; this.reBind(); } var Slider = function(ing,ed){ this.block=document.getElementById("sliderBlock"); this.percent = 0; this.value = 0; this.ing = ing; this.ed = ed; this.init(); } Slider.prototype.init=function(){ var _sx=0; var _cx=0; var o=this.block; var me=this; o.onmousedown=function(e){ var e=window.event||e; _sx = o.offsetLeft; _cx = e.clientX-_sx; document.body.onmousemove=move; document.body.onmouseup=up; }; function move(e){ var e=window.event||e; var pos_x = e.clientX - _cx; pos_x=pos_x<13?13:pos_x; pos_x=pos_x>248+15-50?248+15-50:pos_x; o.style.left = pos_x+"px"; me.percent=(pos_x-13)/2; me.ing(me.percent); } function up(){ document.body.onmousemove=function(){}; document.body.onmouseup=function(){}; } } </script> </html>
所屬頻道:
表單按鈕特效
/
更新時間:2012-11-28
[收藏]
[報錯]
[返回列表]
相關
表單按鈕特效
:
又一個帶描述的表單
可自由移動位置的導航條
頁面轉跳。跟本站的教學文章中的那些轉到第幾頁一樣的
帶Checkbox的列表框
提供四種打開新窗的形式
自動復制代碼
方便登錄各種管理頁面以及任何EMAIL量身定做!
QQ分類搜索代碼
查找表格的內容
一個帶描述的表單
常用email檢驗函數
file框模擬新解
表單按鈕特效Rss訂閱
特效代碼搜索
表單按鈕特效推薦
一個清新的CSS表單布局
CSS+JS實現的漂亮圓角按鈕
Javascript刪除數據時的確認對話框
QQ分類搜索代碼
JavaScript檢測EMail地址輸入是否正確
JS無刷新注冊表單檢測效果
一個按鈕完成對文本框內容的copy和復制
JS輸入限制,不符要求不能輸入的代碼
點擊按鈕后加載進度條
復選框在鼠標移上后自動打勾選中
猜你也喜歡看這些
強大的JavaScript萬年歷(含農歷)
JavaScript日期輸入控件
在狀態欄中顯示停留時間
祥細的Form欄特全時鐘
一個以二進制顯示的時鐘
跟隨鼠標的日期表盤特效
一個定時的倒記時
Js日期選擇并自動加入輸入框
用JS統計網頁運行或停留的時間
Js博客日歷控件
相關鏈接:
復制本頁鏈接
|
搜索拖動條改變圖片大小
特效說明:
表單按鈕模板
-
拖動條改變圖片大小
。