gsap实现星际之门开启动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap实现星际之门开启动画效果代码

代码标签: gsap 星际 开启 动画

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


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

<head>

  <meta charset="UTF-8">
  

  
  
<style>
/* the outer circle */
.portal-outer {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(7.5deg);
	display: grid;
	place-items: center;
	width: 250px;
	height: 250px;
	background: rgba(0 0 0 / 0.85);
	border: 5px solid rgba(0 0 0 / 1);
	border-radius: 50%;
	z-index: -1;
}

.center-spot {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 190px;
	height: 190px;
	background: #1a1a1a;
	border-radius: 50%;
	z-index: 1000;
}

/* the inner circle */
.portal-inner {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: grid;
	place-items: center;
	width: 190px;
	height: 190px;
	background: black;
	border: 1px solid rgba(255 255 255 / 0.5);
	border-radius: 50%;
	box-shadow: 0 0 10px 3px rgba(255 255 255 / 0.5);
	overflow: hidden;
}
img {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 1000px;
	height: 1000px;
	border-radius: 50%;
}

/* lights base style */
.circle {
	position: absolute;
	height: 12px;
	width: 4px;
	background: black;
	border-radius: 50%;
}

/* the lights */
.circle:nth-of-type(1) {
	/* No: 1 */
	transform: rotate(0deg) translateY(-110px);
}

.circle:nth-of-type(2) {
	/* No: 2 */
	transform: rotate(15deg) translateY(-110px);
}

.circle:nth-of-type(3) {
	/* No: 3 */
	transform: rotate(30deg) translateY(-110px);
}

.circle:nth-child(4) {
	/* No: 4 at 3 o'clock */
	transform: rotate(45deg) translateY(-110px);
}

.circle:nth-child(5) {
	/* No: 5 */
	transform: rotate(60deg) translateY(-110px);
}

.circle:nth-child(6) {
	/* No: 6 */
	transform: rotate(75deg) translateY(-110px);
}

.circle:nth-child(7) {
	/* No: 7 at 6 o'clock */
	transform: rotate(90deg) translateY(-110px);
}

.circle:nth-child(8) {
	/* No: 8 */
	transform: rotate(105deg) translateY(-110px);
}

.circle:nth-child(9) {
	/* No: 9 */
	transform: rotate(120deg) translateY(-110px);
}

.circle:nth-child(10) {
	/* No: 10 at 9 o'clock */
	transform: rotate(135deg) translateY(-110px);
}

.circle:nth-child(11) {
	/* No: 11 */
	transform: rotate(150deg) translateY(-110px);
}

.circle:nth-child(12) {
	/* No: 12 */
	transform: rotate(165deg) translateY(-110px);
}

.circle:nth-child(13) {
	/* No: 13 */
	transform: rotate(180deg) translateY(-110px);
}

.circle:nth-child(14) {
	/* No: 14 */
	transform: rotate(195deg) translateY(-110px);
}

.circle:nth-child(15) {
	/* No: 15 */
	transform: rotate(210deg) translateY(-110px);
}

.circle:nth-child(16) {
	/* No: 16 */
	transform: rotate(225deg) translateY(-110px);
}

.circle:nth-child(17) {
	/* No: 17 */
	transform: rotate(240deg) translateY(-110px);
}

.circle:nth-child(18) {
	/* No: 18 */
	transform: rotate(255deg) translateY(-110px);
}

.circle:nth-child(19) {
	/* No: 19 */
	transform: rotate(270deg) translateY(-110px);
}

.circle:nth-child(20) {
	/* No: 20 */
	transform: rotate(285deg) translateY(-110px);
}

.circle:nth-child(21) {
	transform: rotate(300deg) translateY(-110px);
}

.circle:nth-child(22) {
	transform: rotate(315deg) translateY(-110px);
}

.circle:nth-child(23) {
	transform: rotate(330deg) translateY(-110px);
}

.circle:nth-child(24) {
	transform: rotate(345deg) translateY(-11.........完整代码请登录后点击上方下载按钮下载查看

网友评论0