爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
拖动改变层大小脚本
拖动改变层大小脚本
日期:2014-05-18 浏览次数:20190 次
以下是程序代码
<html> <head> <meta name="keywords" content="站长,网页特效,js特效,广告代码,zzjs,zzjs.net,sky,www.zzjs.net,站长特效 网" /> <meta name="description" content="www.zzjs.net,站长特效网,站长必备js特效及广告代码。大量高质量js特效,提供高质量广告代码下载,尽在站长特效网" /> <title>改变层大小的js脚本,sky整理收集。</title> <meta content="text/html; charset=gb2312" http-equiv="Content-Type"> <style> { box-sizing: border-box; moz-box-sizing: border-box } #testDiv { background-color: buttonface; background-repeat: repeat; background-attachment: scroll; color: #3969A5; height: 300px; left: 30px; overflow: hidden; width: 500; z-index: 2; border: 2px outset white; margin: 0px; padding: 2px; background-position: 0% 50% } body { font-family: Verdana; font-size: 9pt } #innerNice { background-color: white; background-repeat: repeat; background-attachment: scroll; color: #3969A5; height: 100%; overflow: auto; width: 100%; border: 2px inset white; padding: 8px; background-position: 0% 50% } </style> <SCRIPT language=javascript> ///////////////////////////////////////////////////////////////////////// // Generic Resize by Erik Arvidsson // // // // You may use this script as long as this disclaimer is remained. // // See www.dtek.chalmers.se/~d96erik/dhtml/ for mor info // // // // How to use this script! // // Link the script in the HEAD and create a container (DIV, preferable // // absolute positioned) and add the class="resizeMe" to it. // ///////////////////////////////////////////////////////////////////////// var theobject = null; //This gets a value as soon as a resize start function resizeObject() { this.el = null; //pointer to the object this.dir = ""; //type of current resize (n, s, e, w, ne, nw, se, sw) this.grabx = null; //Some useful values this.graby = null; this.width = null; this.height = null; this.left = null; this.top = null; } //Find out what kind of resize! Return a string inlcluding the directions function getDirection(el) { var xPos, yPos, offset, dir; dir = ""; xPos = window.event.offsetX; yPos = window.event.offsetY; offset = 8; //The distance from the edge in pixels if (yPos<offset) dir += "n"; else if (yPos > el.offsetHeight-offset) dir += "s"; if (xPos<offset) dir += "w"; else if (xPos > el.offsetWidth-offset) dir += "e"; return dir; } function doDown() { var el = getReal(event.srcElement, "className", "resizeMe"); if (el == null) { theobject = null; return; } dir = getDirection(el); if (dir == "") return; theobject = new resizeObject(); theobject.el = el; theobject.dir = dir; theobject.grabx = window.event.clientX; theobject.graby = window.event.clientY; theobject.width = el.offsetWidth; theobject.height = el.offsetHeight; theobject.left = el.offsetLeft; theobject.top = el.offsetTop; window.event.returnValue = false; window.event.cancelBubble = true; } function doUp() { if (theobject != null) { theobject = null; } } function doMove() { var el, xPos, yPos, str, xMin, yMin; xMin = 8; //The smallest width possible yMin = 8; // height el = getReal(event.srcElement, "className", "resizeMe"); if (el.className == "resizeMe") { str = getDirection(el); //Fix the cursor if (str == "") str = "default"; else str += "-resize"; el.style.cursor = str; } //欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。 //Dragging starts here if(the
上一篇:狡猾的按钮特效
下一篇:点击链接后弹出漂亮的层
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
传三星为赢得新兴市场:推廉价版Note3
成本效益全兼顾 混合云市场前景显现
2019双12阿里云老用户怎么参加拼团活动 老用户拼团方法
雷军会做赔钱生意?迅雷跌破发行价 市值仅7亿美元
三问刘强东:京东为何近来火气这么大?
电信业营改增今起实施 运营商短期利润骤降
牟贵先挂帅 国美在线“价钱战”昔日开打
世界杯让耐克阿迪大打出手 谁能劈开用户大脑?
清点:罗永浩推锤子ROM 小米打法遭模拟
推荐阅读
更多>
美国政府关门可能影响去哪儿等公司IPO
腾讯再次重申:普通微信誉户相对不收费
华为变阵:任正非调整三大业务布局
携程艺龙联手死磕同程 价钱烽烟蔓延至机票
2018年阿里云双11活动如何参加?1折优惠大攻略
京东封杀财付通:终极目标是电商生态圈
屌丝程序猿发家机会来了 用大数据来做生意!
三问刘强东:京东为何近来火气这么大?
迅雷再次在美提交IPO申请
HTC曝出特大丑闻:高管诈骗+商业间谍
微软大幅调整Bing在华策略:从高大上到接地气
移动联通回应税率改革:短期内收入利润将大减
黑狐病毒疯传播 电脑管家首推 专杀工具
PC迎9年来出货量新低 平板电脑渐成主流
虚拟运营商前路迷茫 业界建议发力车联网
京东终于想明白,这些年错过的财运,都藏在女人的时装下
王建宙解构OTT效劳 中移动重塑飞信平台
全球最具“颠覆性”特质的公司排行榜TOP25
搜狐与奇虎360或结盟对抗BAT
P2P平台科迅网疑“跑路” 涉及金额超2700万