首页 > 解决方案 > 如何在jquery中为图像onclick添加给定的爆炸效果

问题描述

我有一个代码,其中有一个imagein img tag

我有一个code for explode图像....

want to add this explode effect for onclick of image

如何在 jquery 中将这种爆炸效果添加到图像 onclick...

$("img").explode();

$("img").explode({
  omitLastLine = false,
  radius = 80,
  minRadius = 20,
  release = true,
  fadeTime = 300,
  recycle = true,
  recycleDelay = 500,
  fill = true,
  explodeTime = 300,
  maxAngle = 360,
  gravity = 0,
  round = false,
  groundDistance = 400,
  ignoreCompelete = false,
  land=true,
  checkOutBound,
  finish,
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="//code.jquery.com/jquery-3.1.0.min.js"></script>
<!-- <script src="dist/jquery.imgexplode.min.js"></script>-->
<script src="jquery.imgexplode.js"></script>

<img src="https://picsum.photos/200/300" />

标签: jqueryhtml

解决方案


推荐阅读