vectorfetti+svg实现跟随鼠标用针戳破漂浮的气泡爆炸动画效果代码

代码语言:html

所属分类:其他

代码描述:vectorfetti+svg实现跟随鼠标用针戳破漂浮的气泡爆炸动画效果代码

代码标签: vectorfetti svg 跟随 鼠标 戳破 漂浮 气泡 爆炸 动画

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

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

<head>
  <meta charset="UTF-8">
  

  <meta name="viewport" content="width=device-width, initial-scale=1">
  
  
  
<style>
body {
	margin: 0 auto;
	height: 100vh;
	background: linear-gradient(45deg, #000000,#232323);
}
.bubblePopper {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	height: 100%;
	width: 100%;
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewbox='0 0 28 28' height='28' width='28'%3E%3Cpath d='M 2 2 l23 23' fill='none' stroke='rgba(0,0,0,0.5)' stroke-width='1.6' stroke-linecap='round' /%3E%3Cpath d='M 2 2 l23 23' fill='none' stroke='%23ccc' stroke-width='1.4' stroke-linecap='round' /%3E%3Ccircle cx='24' cy='24' r='3.3' fill='rgba(0,0,0,0.5)' /%3E%3Ccircle cx='24' cy='24' r='3' fill='orange' /%3E%3C/svg%3E")
			2 2,
		auto;
}
}
.mouth, .eyeL, .eyeR {
	transition: 200ms;
}
#reset {
	position: fixed;
	bottom: 20px;
	right: 20px;
	height: 70px;
	width: 70px;
	border-radius: 50%;
	box-shadow: 0px 4px 6px rgba(0,0,0,0.8);
	border: none;
	cursor: pointer;
	font-weight: bold;
	background: #d1cfe2;
}
#reset > span {
	user-select: none;
	pointer-events: none;
}
#reset:hover {
	transform:translateY(-2px);
	box-shadow: 0px 6px 8px rgba(0,0,0,0.6);
	border: 2px solid #52b2cf;
}
&l.........完整代码请登录后点击上方下载按钮下载查看

网友评论0