cid1017 使用JQuery Ripples Plugin 实现鼠标点击划过水纹效果

index.html

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="style.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.ripples/0.5.3/jquery.ripples.min.js"></script>
  </head>
  <body>
    <div class="full-landing-image">

    </div>

    <script>
      $(".full-landing-image").ripples({
        resolution: 256,
        perturbance: 0.04,
      });
    </script>
  </body>
</html>

 

style.css

body{
  margin: 0;
  padding: 0;
}

.full-landing-image{
  width: 100%;
  height: 100vh;
  background: url(bg.jpg) no-repeat center;
  background-size: cover;
}

 

在线演示


让链接同时具备两种打开方式

获取源码: Water Ripples Effect
下载数:113人次, 文件大小: 98.4 KB, 上传日期: 2020年-11 月-25日

公众号回复:gcode  获取解压密码

qrcode_for_gh_6ea2c28a1709_258 (1)

3,089 人查阅

类似文章