zoukankan
html css js c++ java
缓慢放大div
<style> #testzoom{border:1px solid #ccc;background:#eee;} </style> <input type="button" value="test-div" onclick="zoomDiv('testzoom')" /> <div id="testzoom" style="100px;height:100px;">This is a div</div> <script type="text/javascript"> function $(id){ return document.getElementById(id); } function zoomDiv(id){ var obj = $(id); var changeW = function (){ var obj_w = parseInt(obj.style.width); var obj_h = parseInt(obj.style.height); if (obj_h <= 350 || obj_w < 400) { obj.style.width = (obj_w + Math.ceil((400 - obj_w) / 10)) + 'px'; obj.style.height = (obj_h + Math.ceil((350 - obj_h) / 10)) + 'px'; } else { clearInterval(bw1); } } bw1= setInterval(changeW,1); } </script>
运行代码
查看全文
相关阅读:
浅谈Vue基础知识(二)
浅谈Vue基础知识(一)
ES 6
网易DBA私享会分享会笔记2
网易DBA私享会分享会笔记1
centos6.5适用的国内yum源:网易、搜狐
如何去除 ckeditor 上传图片后在原码中留下的 style="width: 100%;height:100px"之类的代码呢?
关于json.ajax ,php的那点事
去掉所有的html标签
[CentOS 0010] CentOS 配置mysql允许远程登录
原文地址:https://www.cnblogs.com/jikey/p/1753130.html
最新文章
wx入门(一)
urllib模块 (一)
文件读写
类初试
os模块
函数—参数会变吗
linux vim 编辑批量下载脚本
Linux 压缩和解压缩命令-gzip/gunzip
Linux 挂载第二块硬盘
Linux 系统密码破解
热门文章
ESXI 6.5安装
linux 常用目录命令
RHEL 7 挂载优盘
雪碧图和图片映射
flex布局
css设置水平垂直居中的四种方法
Markdown 基本编写规范
express+mysql实现简单的增删改查
vue-cli新建项目
浅谈Vue中的动画
Copyright © 2011-2022 走看看