首页 > 其他 > 详细

一张图片无限放大缩小效果

时间:2019-09-12 12:11:46      阅读:204      评论:0      收藏:0      [点我收藏+]
<img src="img/putao.png" width="100px" height="80px">

  

<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
	$(function() {
		setInterval(function(){
			$(‘img‘).each(function() {
				var wValue = 1.5 * $(this).width();
				var hValue = 1.5 * $(this).height();
				$(this).animate({
					width: wValue,
					height: hValue,
					left: ("-" + (0.5 * $(this).width()) / 2),
					top: ("-" + (0.5 * $(this).height()) / 2)
				}, 1000);
			}).each(function() {
				$(this).animate({
					width: "100",
					height: "80",
					left: "0px",
					top: "0px"
				}, 1000);
			});
		},2000);		
	});
</script>

  

一张图片无限放大缩小效果

原文:https://www.cnblogs.com/yyy251/p/11510832.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!