gsap+css实现容器水盛满倒计时动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap+css实现容器水盛满倒计时动画效果代码

代码标签: gsap css 容器 盛满 倒计时 动画

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

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

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

  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,400i,700">
  
  
  
<style>
body {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	height: 90vh;
	background-color: hsl(35, 50%, 80%);
	font-family: Lato, sans-serif;
	font-weight: 700;
	font-style: normal;
}

text {
	text-anchor: middle;
	dominant-baseline: middle;
	font-size: 16px;
	fill: rgba(0, 0, 0, 0.5);
}

.inputs {
	text-align: center;
}

.slider {
	margin: 20px 0px;
}

.slider {
	-webkit-appearance: none;
	width: 300px;
	height: 3px;
	border-radius: 1px;
	background: #59423f;
	outline: none;
	opacity: 0.7;
	-webkit-transition: 0.2s;
	transition: opacity 0.2s;
	display: block;
}

.slider:hover {
	opacity: 1;
}

.slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #59423f;
	cursor: pointer;
}

.slider::-moz-range-thumb {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #59423f;
	cursor: pointer;
}

button {
	background-color: transparent;
	border: 1px solid #59423f;
	color: #59423f;
	padding: 8px 16px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	cursor: pointer;
	font-size: 8px;
	text-transform: uppercase;
	border-radius: 5px;
	transition: 0.4s;
}

#slider {
	cursor: not-allowed;
}
#button {
	cursor: not-allowed;
}
</style>

  
</head>

<body translate="no">
  <svg width="300" height="300" xmlns="http://www.w3.org/2000/svg">
	<defs>
		<mask id="mask">
			<circle cx="150" cy="150" r="140" fill="#A6785D" />
		</mask>
	</defs>
	<circle cx="150" cy="150" r="150" fill="#A6785D" />
	<g mask="url(#mask)">
		<rect id="gonggong" x="0" y="0" width="500" height="500" fill="#59423F" />
	</g>
	<text x="150" y="220" id="x">MEDITATION TIME</text>
	<text x="150" y="240" id="countdown"></text>
</svg>

<div class="inputs">
	<input type=".........完整代码请登录后点击上方下载按钮下载查看

网友评论0