多个div变宽
来源:互联网 发布:路由器dns劫持数据 编辑:程序博客网 时间:2024/04/29 18:18
<!doctype html><html><head><meta charset="utf-8"><title>多个div变宽</title><style>div{ width:100px; height:50px; background:red; margin:10px; }</style><script>window.onload=function(){ var aDiv=document.getElementsByTagName('div'); for(var i=0;i<aDiv.length;i++) { aDiv[i].timer=null; aDiv[i].onmouseover=function() {startMove(this,400); } aDiv[i].onmouseout=function() {startMove(this,100); } }}//var timer=null; function startMove(obj,iTarget) { clearInterval(obj.timer); obj.timer=setInterval(function(){ var speed=(iTarget-obj.offsetWidth)/6; speed=speed>0?Math.ceil(speed):Math.floor(speed); if(obj.offsetWidth==iTarget) { clearInterval(obj.timer); } else { obj.style.width=obj.offsetWidth+speed+'px'; } },30); }</script></head><body><div></div><div></div><div></div></body></html>
0 0
- 多个div变宽
- 多个div 缓冲运动—变宽
- JS运动之多物体框架--多个div变宽
- JavaScript 动画之多个div同时变宽
- (42)JS运动之多物体框架--多个div变宽
- JQuery插件第三十四个 : div左右变宽
- 一个div 缓冲运动—变宽
- div的变宽和变高 _复杂版
- 两侧列固定中间列变宽Div布局参考
- 解决使用offsetWidth让DIV自动变宽时出现的小BUG。
- js改变宽高字体大小透明度多物体模块运动
- js改变宽高字体大小透明度多物体模块运动
- storyboard变宽
- 多个div同行显示
- 多个div水平对齐
- html 并列多个DIV
- 多个DIV,并排居中
- css多个div横排
- 二分查找
- navicat for mysql 10.1.7注册码
- gsoap生成webservice调用客户端接口 .
- Leetcode: Search in Rotated Sorted Array 理解分析
- grub:多系统引导
- 多个div变宽
- 国航空中wifi民意调查,9成网友要求免费wifi
- 如何由ASP.NET 1.1移植到ASP.NET 2.0
- 苹果手机资料丢失怎么办
- hdu2642 二维树状组
- 介绍几个图论和复杂网络的程序库 —— BGL,QuickGraph,igraph和NetworkX
- 黑马程序员_高新技术_反射
- 如何在ASP.NET 应用中上传大文件
- ioctl函数