HTML+CSS+jquery代码实例:水波纹效果与纯HTML CSS和jquery(拿来就能用)

效果:

代码:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>菜鸟教程(runoob.com)</title> 
<script src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js">
</script>
	  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.ripples/0.5.3/jquery.ripples.min.js"></script>
<script>
$(document).ready(function(){
$(".full-landing-image").ripples({
  resolution: 200,
  perturbance: 0.04,
});
});
</script>
		<style>
		.full-landing-image
{
  width: 100%;
  height: 100vh;
  background: url(https://img.tukuppt.com/png_preview/00/11/21/QavTHpmzY6.jpg!/fw/780) no-repeat center;
  background-size: cover;
}
	</style>
</head>
<body>
<div class="full-landing-image"></div>
</body>
</html>

猜你喜欢

转载自blog.csdn.net/qq_22182989/article/details/125450537