svg+gsap实现脉冲按钮点击动画效果代码

代码语言:html

所属分类:动画

代码描述:svg+gsap实现脉冲按钮点击动画效果代码

代码标签: svg gsap 脉冲 按钮 点击 动画

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

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

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

  
  
<style>
:root {
	--color1: #1c1b1b;
}
body {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100vh;
	margin: 0;
	background-color: var(--color1);
}

#round {
	position: relative;
	width: 100%;
	height: 100%;
}

button {
	font-size: 1.2em;
	width: 220px;
	height: 220px;
	cursor: pointer;
	border: none;
	border-radius: 100%;
	overflow: hidden;
}
#container {
	position: relative;
	width: 300px;
	height: 300px;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}
.rect {
	fill: #db5a40;
}
#outside {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: -1;
	width: 100%;
	height: 100%;
	transform: translate(-50%, -50%);
	z-index: -2;
}
#svg1 {
	width: 100%;
	height: 100%;
}
.text {
	mix-blend-mode: difference;
}
button#start {
	position: relative; /* Essential for absolute positioning of pseudo-elements */
	background: linear-gradient(145deg, #1e1e1e, #1e1e1e);
	box-shadow: 6px 6px 12px #0a0a0a, -6px -6px 12px #141414;
	text-transform: uppercase.........完整代码请登录后点击上方下载按钮下载查看

网友评论0