zoukankan      html  css  js  c++  java
  • Css3实现波浪效果2

    一、不规则圆,旋转实现波浪效果

      .info {
                width: 200px;
                height: 200px;
                ;
                background: #009A61;
                border-radius: 45%;
                color: white;
                text-align: center;
                line-height: 200px;
    
                animation: roateOne 2s linear infinite;
            }
    
            @keyframes roateOne {
                from {
                    transform: rotate(0);
                }
    
                to {
                    transform: rotate(180deg);
                }
            }

    二、2个大圆的旋转

    .info {
        height: 100vh;
        align-items: center;
        position: relative;
        border: 1px solid red;
        background-color: rgb(118, 218, 255);
        overflow: hidden;
    }
    
    .info::before,
    .info::after {
        content: "";
        position: absolute;
        left: 50%;
        min-width: 300vw;
        min-height: 300vw;
        background: #fff;
        animation: roateOne 10s linear infinite;
    }
    
    .info::before {
        bottom: 15vh;
        border-radius: 45%;
    }
    
    .info::after {
        bottom: 12vh;
        opacity: 0.5;
        border-radius: 47%;
    }
    
    @keyframes roateOne {
        0% {
            transform: translate(-50%, 0) rotateZ(0deg);
        }
    
        50% {
            transform: translate(-50%, -2%) rotateZ(180deg);
        }
    
        100% {
            transform: translate(-50%, 0%) rotateZ(360deg);
        }
    }

    三、常见样式

    .container {
        position: absolute;
        width: 200px;
        height: 200px;
        padding: 5px;
        border: 5px solid rgb(118, 218, 255);
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        overflow: hidden;
    }
    
    .info {
        width: 200px;
        height: 200px;
        position: relative;
    
        background-color: rgb(118, 218, 255);
        border-radius: 50%;
        overflow: hidden;
    }
    
    .info::before,
    .info::after {
        content: "";
        position: absolute;
        left: 50%;
        min-width: 400px;
        min-height: 400px;
        background: #fff;
        animation: roateOne 10s linear infinite;
    }
    
    .info::before {
        bottom: 50px;
        border-radius: 45%;
    }
    
    .info::after {
        bottom: 40px;
        opacity: 0.5;
        border-radius: 47%;
    }
    
    @keyframes roateOne {
        0% {
            transform: translate(-50%, 0) rotateZ(0deg);
        }
    
        50% {
            transform: translate(-50%, -2%) rotateZ(180deg);
        }
    
        100% {
            transform: translate(-50%, 0%) rotateZ(360deg);
        }
    }
        <div class="container">
            <div class="info">
                Wave
            </div>
        </div>

    显示效果:

    更多:

    Css3实现波浪线效果1

    HTML5 background-color和background-image问题共用问题

    CSS网页布局垂直居中整理

  • 相关阅读:
    postgresql删除活动链接的数据库
    第四篇 函数
    Jmeter响应中文乱码解决办法
    第三篇 条件控制和循环
    第二篇 Python运算符
    npm更换为镜像
    第一篇 Python的数据类型
    newman的常用命令使用总结
    windows下安装newman
    同态包络提取
  • 原文地址:https://www.cnblogs.com/tianma3798/p/9718297.html
Copyright © 2011-2022 走看看