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>
运行代码
查看全文
相关阅读:
[LUOGU] P2196 挖地雷
[LUOGU] P1020 导弹拦截
[LUOGU] P2543 [AHOI2004]奇怪的字符串
[LUOGU] P2759 奇怪的函数
[LUOGU] P1048 采药
[LUOGU] P1396 营救
[LUOGU] P1196 [NOI2002]银河英雄传说
[LUOGU] 2820 局域网
知识点
swich使用
原文地址:https://www.cnblogs.com/jikey/p/1753130.html
最新文章
杭电 1235 统计同成绩学生人数
杭电 1232 畅通工程 【并查集】
UVa 10106 Product 【大数相乘】WA
UVa 424 Integer Inquiry 【大数相加】
杭电 4506 小明系列故事——师兄帮帮忙【快速幂取模】
杭电 1262 寻找素数对 【素数】
杭电 2817 A sequence of numbers【快速幂取模】
POJ 1995 Raising Modulo Numbers 【快速幂取模】
主席树模板(poj 2104&&poj2761)
spoj8406
热门文章
sgu187&&spoj7734
poj3481
poj2895
poj2892
poj2828
bzoj1503
bzoj1208
bzoj1588
[LUOGU] P1063 能量项链
[LUOGU] P1880 [NOI1995]石子合并
Copyright © 2011-2022 走看看