点击按钮发送爆炸动画效果

代码语言:html

所属分类:动画

代码描述:点击按钮发送爆炸动画效果

代码标签: 爆炸 动画 效果

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Hind&amp;display=swap'>
<style>
* {
	border: 0;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
:root {
	font-size: calc(16px + (48 - 16)*(100vw - 320px)/(2560 - 320));
}
body, button {
	font: 1em/1.5 "Hind", sans-serif;
}
body {
	background: #e3e4e8;
	display: flex;
	height: 100vh;
	overflow: hidden;
}
button {
	background: #255ff4;
	border-radius: 0.2em;
	color: #fff;
	cursor: pointer;
	margin: auto;
	padding: 0.5em 1em;
	transition: background .15s linear, color .15s linear;
}
button:focus, button:hover {
	background: #0b46da;
}
button:focus {
	outline: transparent;
}
button::-moz-focus-inner {
	border: 0;
}
button:active {
	transform: translateY(0.1em);
}
.exploding, .exploding:focus, .exploding:hover {
	background: transparent;
	color: transparent;
}
.exploding {
	pointer-events: none;
	position: relative;
	will-change: transform;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0