canvas水波纹效果,jquery鼠标水波纹插件

效果展示
水波纹效果

jQuery水波纹效果,canvas水波纹插件

HTML代码片段

<div class="scroll04wrap">
	<h3>发展历程</h3>
	<div class="scroll04">
		<p>不要回头,一直向前</p>
	</div>
</div>

css代码片段

/* scroll04 */
.scroll04wrap{width: 100%;position: relative;margin-top: 100px;}
.scroll04wrap h3{font-size: 50px;color: #2e5c72;margin-bottom: 30px;line-height: 86px;font-weight: bold;text-align: center;}
.scroll04{width: 100%;position: relative;box-sizing: border-box;padding: 250px 0;background:url(images/qyqxbg02.jpg) no-repeat fixed;background-size: cover;display: flex;display: -webkit-flex;justify-content: center;-webkit-justify-content: center;}
.scroll04 p{font-size: 28px;color: #fff;writing-mode: vertical-lr;font-family: cursive;font-weight: bold;letter-spacing: 5px;}

js代码片段
注:需引入 jquery.js 插件和 ripples.js 插件

<script src="js/ripples.js"></script>
<script>
	$(document).ready(function() {
		try {
			$('.scroll04').ripples({
				resolution: 512,
				dropRadius: 20, //px
				perturbance: 0.04,
			});
		}
		catch (e) {
			$('.error').show().text(e);
		}
	});
</script>
Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐