纯css实现圆锥体立体旋转摇晃动画效果代码

代码语言:html

所属分类:动画

代码描述:纯css实现圆锥体立体旋转摇晃动画效果代码

代码标签: css 圆锥体 立体 旋转 摇晃 动画

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


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

<head>

  <meta charset="UTF-8">

  
  
  
<style>
body {
	margin: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	--ring: #3b3a4c;
	--speed: 8s;
	--light: #fff8;
	background: radial-gradient(#fff0 40%, #000c 100%), linear-gradient(315deg, #bdd4e7 0%, #8693ab 74%);

}

body:before {
	content: "";
	position: absolute;
	background:red;
	width: 70vmin;
	height: 70vmin;
	animation: spin var(--speed) linear 0s infinite;
	border-radius: 100%;
	background: 
		/* deepest rings */
		radial-gradient(circle at 50.5% 50%, #fff0 4.5vmin, var(--ring) calc(4.5vmin + 1px) 5.5vmin, #fff0 calc(5.5vmin + 1px) 100vmin),
		radial-gradient(circle at 52% 50%, #fff0 5.5vmin, var(--ring) calc(5.5vmin + 1px) 6.5vmin, #fff0 calc(6.5vmin + 1px) 100vmin),
		radial-gradient(circle at 53.5% 50%, #fff0 6.5vmin, var(--ring) calc(6.5vmin + 1px) 7.5vmin, #fff0 calc(7.5vmin + 1px) 100vmin),
		radial-gradient(circle at 55% 50%, #fff0 7.5vmin, var(--ring) calc(7.5vmin + 1px) 8.5vmin, #fff0 calc(8.5vmin + 1px) 100vmin),
		radial-gradient(circle at 56.5% 50%, #fff0 8.5vmin, var(--ring) calc(8.5vmin + 1px) 9.5vmin, #fff0 calc(9.5vmin + 1px) 100vmin),
		radial-gradient(circle at 57.75% 50%, #fff0 9.5vmin, var(--ring) calc(9.5vmin + 1px) 10.5vmin, #fff0 calc(10.5vmin + 1px) 100vmin),
		radial-gradient(circle at 59.25% 50%, #fff0 10.5vmin, var(--ring) calc(10.5vmin + 1px) 11.5vmin, #fff0 calc(11.5vmin + 1px) 100vmin),
		/* deeper rings */
		radial-gradient(circle at 59.75% 50%, #fff0 11vmin, var(--ring) calc(11vmin + 1px) 12vmin, #fff0 calc(12vmin + 1px) 100vmin),
		radial-gradient(circle at 58.25% 50%, #fff0 12vmin, var(--ring) calc(12vmin + 1px) 13vmin, #fff0 calc(13vmin + 1px) 100vmin),
		radial-gradient(circle at 56.75% 50%, #fff0 13vmin, var(--ring) calc(13vmin + 1px) 14vmin, #fff0 calc(14vmin + 1px) 100vmin),
		radial-gradient(circle at 55.25% 50%, #fff0 14vmin, var(--ring) calc(14vmin + 1px) 15vmin, #fff0 calc(15vmin + 1px) 100vmin),
		radial-gradient(circle at 53.75% 50%, #fff0 15vmin, var(--ring) calc(15vmin + 1px) 16vmin, #fff0 calc(16vmin + 1px) 100vmin),
		radial-gradient(circle at 52.25% 50%, #fff0 16vmin, var(--ring) calc(16vmin + 1px) 17vmin, #fff0 calc(17vmin + 1px) 100vmin),
		radial-gradient(circle at 50.75% 50%, #fff0 17vmin, var(--ring) calc(17vmin + 1px) 18vmin, #fff0 calc(18vmin + 1px) 100vmin),  
		/* inner rings */
		radial-gradient(circle at 50% 50%, #fff0 17.5vmin, var(--ring) calc(17.5vmin + 1px) 18.5vmin, #fff0 calc(18.5vmin + 1px) 100vmin),
		radial-gradient(circle at 51.5% 50%, #fff0 18.5vmin, var(--ring) calc(18.5vmin + 1px) 1.........完整代码请登录后点击上方下载按钮下载查看

网友评论0