gsap+svg实现滚动泡泡动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap+svg实现滚动泡泡动画效果代码

代码标签: 泡泡 动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
body {
	padding: 0;
	margin: 0;
	height: 300vh;
	font-family: vortice-concept, sans-serif;
	font-weight: 400;
	font-style: normal;
}

#bubblezSVG {
	position: fixed;
	height: 100%;
	width: 110%;
	top: 0;
	left: -5%;
	overflow: visible;
	z-index: -1;
}

#top {
	z-index: 2;
	pointer-events: none;
}

svg {
	font-size: 35px;
	fill: #313639;
}

#textSVG {
	position: fixed;
	width: 110%;
	top: 40vh;
	left: -5%;
}
</style>




</head>

<body>
  <svg id="bubblezSVG" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid slice">

	<mask id="maskBubblez">

	</mask>
	<image mask="url(#maskBubblez)" preserveAspectRatio="xMidYMid slice" href="https://assets.codepen.io/756881/mesh-gradient+%283%29.png" height="150" width="100" />
</svg>

<svg id="textSVG" viewBox="0 0 1000 200">
	<path fill="none" id="curve" d="M0,100S269.931,186.612,520,100C770.069,13.388,1000,100,1000,100" />
	<text x="-50" font-size="45">
		<textPath id="text" xlink:href="#curve" startOffset="1200">
			Wobbly text and gradient bubbles....
		</textPath>
	</text>
</svg>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/gsap.3.5.2.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/.........完整代码请登录后点击上方下载按钮下载查看

网友评论0