美文网首页
css3-3d动画1

css3-3d动画1

作者: 钢铁萝莉猫 | 来源:发表于2022-07-22 09:58 被阅读0次
  • 闹着玩
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>T</title>
    <style>
        body{
            background-color: #000;
            width: 100%;
            height: 100%;
        }
        a{
            text-decoration: none;
        }
        .btn-wrap{
            display: flex;
            justify-content: space-around;
            transform-style: preserve-3d;
            transform: translateY(150px);
            width: 500px;
            margin: 0 auto;
            position: relative;
        }
        .btn-wrap > div{
            position: relative;
            
        }
        .btn-wrap > div:hover::after {
            opacity: 1;
        }
        .btn-wrap > div::after{
            content: '';
            display: block;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            bottom: -40px;
            width: 35px;
            height: 10px;
            background-image: radial-gradient(#000 35%,aqua 100%);
            border-radius: 99%;
            transition: all 0.3s;
            opacity: 0;
        }
        .btn-cdp,.btn-map,.btn-login{
            display: block;
            border-radius: 50%;
            background-image: radial-gradient(aqua 10%, rgba(0, 255, 255, 0) 80%,#000 100%);
            text-align: center;
            cursor: pointer;
            animation-direction: alternate;
            animation-iteration-count: infinite;
            position: relative;
            color: #000000;
        }

        .btn-cdp{
            width: 60px;
            height: 60px;
            line-height: 60px;
            animation-name:shape-cdp;
            animation-duration: 2s;
        }
        @keyframes shape-cdp
        {
            0% {
                transform: scale(0.8) translateY(0);
            }
            100% {
                transform: scale(1.5) translateY(-10px);
            }
        }


        .btn-map{
            width: 70px;
            height: 70px;
            line-height: 70px;
            animation-name:shape-map;
            animation-duration: 2.3s;
            animation-delay: 0.5s;
        }
        @keyframes shape-map
        {
            0% {
                transform: scale(0.7) translateY(0);
            }
            100% {
                transform: scale(1.3) translateY(15px);
            }
        }


        /* .btn-login{
            width: 85px;
            height: 85px;
            line-height: 85px;
            animation-name:shape-login;
            animation-duration: 2s;
            animation-delay: 0.3s;
        }
        @keyframes shape-login
        {
            0% {
                transform: scale(0.75) translateY(0);
            }
            100% {
                transform: scale(1.4) translateY(-8px);
            }
        } */


        /* ----- */
        .canvas {
            margin: 50px auto;
            padding: 1px;
            width: 800px;
            height: 800px;
            transform-style: preserve-3d;
            transform: perspective(500px);
        }
        .login-wrap {
            position: relative;
            margin: 0px auto;
            margin-top: -45px;
            width: 300px;
            height: 300px;
            /* border: 1px solid #ddd; */
            border-radius: 50%;
            transform: rotateX(45deg) translateY(200px);
            transform-style: preserve-3d;
        }
        .login {
            width: 40px;
            height: 40px;
            font-size: 12px;
            border-radius: 50%;
            text-align: center;
            color: aqua;
            box-shadow: aqua 0 0 16px inset;
            line-height: 40px;
            display: block;
            position: absolute;
            top: -22px;
            left: -22px;
            animation:
                moveX 4s cubic-bezier(0.36, 0, 0.64, 1) -2s infinite alternate,
                moveY 4s cubic-bezier(0.36, 0, 0.64, 1) 0s infinite alternate;
            transform: rotateX(-45deg);
            cursor: pointer;
        }
        .hello{
            display: block;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translateX(-50%) translateY(-50%) rotateX(-45deg);
            color: aqua;
        }
        .login:hover{
            animation-play-state: paused;
        }
        @keyframes moveX {
            0% {
                left: -42px;
            }
            100% {
                left: 300px;
            }
        }

        @keyframes moveY {
            0% {
                top: -42px;
            }
            100% {
                top: 300px;
            }
        }

    </style>
</head>
<body>
    <div class="canvas">
        <div class="login-wrap">
            <span class="hello">hello,nuza</span>
            <a class="login" href="./login/">login</a>
        </div>
        <div class="btn-wrap">
            <div>
                <a class="btn-cdp" href="./cdp/">cdp</a>
            </div>
            <div>
                <a class="btn-map" href="./map/">map</a>
            </div>
        </div>

        <!-- <div class="btn-wrap">
            <div>
                <a class="btn-cdp" href="./cdp/">cdp</a>
            </div>
            <div>
                <a class="btn-map" href="./map/">map</a>
            </div>
            <div>
                <a class="btn-login" href="./login/">login</a>
            </div>
        </div> -->

    </div>
</body>
</html>

相关文章

  • css3-3d动画1

    闹着玩

  • 05、CSS3-3D变换和动画

    一、3D变换 transform 新增函数 rotateX() rotateY() rotateZ() trans...

  • 05、CSS3-3D变换和动画

    一、3D变换 transform-style建立3D空间 perspective 景深 perspective- ...

  • --- > css3-3D

    3d变形 使用二维变形能够在水平和垂直轴上改变元素, 然而还有一个轴,沿着它可以改变元素, z轴 z轴的正方向就是...

  • 属性动画详解

    1. 动画分类 Android 中动画分为 3 种:View 动画(视图动画)、帧动画、属性动画。 (1)帧动画:...

  • 动画(1)

    一、Android 动画分类 总的来说,Android动画可以分为两类,最初的传统动画和Android3.0 之后...

  • CSS3-3D技术

    CSS3中的3D坐标系与上述的3D坐标系是有一定区别的,相当于其绕着X轴旋转了180度,如下图 简单记住他们的坐标...

  • 仿菁优网首页动画效果

    1、菁优网首页动画效果图 2、动画效果分析 1、动画效果一定是UIView动画,因为核心动画是CALayer的动画...

  • html5和css3新特性之动画

    此处总结动画及私有前缀。 (一)动画 动画需要先定义,再调用。 1.定义动画 1)连续动画的定义 @keyfram...

  • iOS动画

    iOS 动画1:UIKit的动画2:Core Animation 动画 UIKit 动画 UIKit 的动画构建比...

网友评论

      本文标题:css3-3d动画1

      本文链接:https://www.haomeiwen.com/subject/dhrmirtx.html