gsap实现星际之门开启动画效果代码
代码语言:html
所属分类:动画
代码描述: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: .........完整代码请登录后点击上方下载按钮下载查看
网友评论0