div+css实现螺旋黑洞旋转动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现螺旋黑洞旋转动画效果代码

代码标签: div css 螺旋 黑洞 旋转 动画

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

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

<style>
    body {
	margin: 0;
	padding: 0;
	width: 100vw;
	height: 100vh;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 50% 50%, #222, #111, #080808);
}

.content {
	width: 80vmin;
	height: 80vmin;
	position: relative;
	animation: spin 5s linear 0s infinite;
}

@keyframes spin {
	100% { transform: rotate(360deg); }
}

.content > div {
	--line: #47c;
	position: absolute;
	width: 70%;
	height: 70%;
	border-radius: 100%;
	box-sizing: border-box;	
	box-shadow: -3vmin 3vmin 3vmin 0 #161616 inset, 1vmin -1vmin 0.125vmin -1.25vmin var(--line);
	background:
		radial-gradient(circle at 36% 64%, #fff0 0 calc(53.5% - 1px), var(--line) 53.5% 54%, #fff0 calc(54% + 1px) 100%),
		radial-gradient(circle at 38% 62%, #fff0 0 calc(54.5% - 1px), var(--line) 54.5% 55%, #fff0 calc(55% + 1px) 100%),
		radial-gradient(circle at 42% 58%, #fff0 0 calc(57.75% - 1px), var(--line) 57.75% 58%, #fff0 calc(58% + 1px) 100%),  
		radial-gradient(circle at 40% 60%, #fff0 0 calc(56.75% - 1px), var(--line) 56.75% 57%, #fff0 calc(57% + 1px) 100%),
		radial-gradient(circle at 45% 55%, #fff0 0 calc(61.75% - 1px), var(--line) 6.........完整代码请登录后点击上方下载按钮下载查看

网友评论0