gsap实现摩天轮旋转效果

代码语言:html

所属分类:动画

代码描述:gsap实现摩天轮旋转效果

代码标签: 旋转 效果

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


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

<style>
body {
        margin: 0;
        padding: 0;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #FCE69D;
        }
        .ferris-wheel {
        position: relative;
        width: 502px;
        height: 502px;
        }
        .ferris-wheel .wheel-wrap {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        animation: wheel_rotate 30s infinite linear;
        }
        .wheels {
        position: absolute;
        border: 5px solid #333;
        width: 502px;
        height: 502px;
        border-radius: 50%;
        box-sizing: border-box;
        }
        .wheels:before {
        content: '';
        position: absolute;
        z-index: 1;
        left: 50%;
        top: 50%;
        width: 408px;
        height: 408px;
        margin-left: -204px;
        margin-top: -204px;
        border: 5px solid #333;
        border-radius: 50%;
        box-sizing: border-box;
        }
        .wheels:after {
        content: '';
        position: absolute;
        z-index: 2;
        left: 50%;
    .........完整代码请登录后点击上方下载按钮下载查看

网友评论0