confetti实现canvas礼花碎片粒子动画喷射效果代码

代码语言:html

所属分类:粒子

代码描述:confetti实现canvas礼花碎片粒子动画喷射效果代码

代码标签: 礼花 碎片 粒子 动画 喷射 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
html,
body {
	margin: 0;
	padding: 0;
	width: 100wh;
	height: 100vh;
	background: black;
	font-weight: 100;
	font-family: sans-serif;
}

body {
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

button {
	position: relative;
	bottom: 20%;
	font-size: 24pt;
	letter-spacing: 3px;
	background: #9b1c2c;
	border: none;
	border-radius: 5px;
	color: white;
	cursor: pointer;
	transition: all 0.4s;
	padding: 10px 20px;
}

button:hover {
	color: #041e42;
}

button:focus {
	outline: none;
}
</style>


</head>

<body translate="no" >
  <button>It's time for Confetti!</button>

  
  
      <script type="module">
impo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0