zoukankan      html  css  js  c++  java
  • css3动画(animation)效果1-漂浮的白云

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>漂浮的白云</title>
        <style type="text/css">
            .box {
                position: relative;
                height: 300px;
                width: 500px;
            }
    
            .in1, .in2 {
                position: absolute;
                height: 100%;
                width: 100%;
                background-size: cover;
                animation: move 100s infinite linear alternate;
            }
    
            @keyframes move {
                100% {
                    background-position: 500% 0;
                }
            }
    
            .in1 {
                background-image: url('http://sandbox.runjs.cn/uploads/rs/26/ddzmgynp/cloud.png');
            }
    
            .in2 {
                background-image: url('http://sandbox.runjs.cn/uploads/rs/26/ddzmgynp/cloud1.png');
                animation-duration: 10s;
            }
        </style>
    </head>
    <body>
    <h1>漂浮的白云</h1>
    <div class="box">
        <div class="in1"></div>
        <div class="in2"></div>
    </div>
    
    
    <strong>【简要介绍】</strong>
      <p>漂浮的白云主要通过远景白云和近景白云来实现立体漂浮效果。远景和近景分别使用两张背景图片,通过改变其背景定位来实现白云移动效果,通过设置不同的动画持续时间来实现交错漂浮的效果</p>
    </body>
    </html>

    效果图:

     原链接:https://www.cnblogs.com/xiaohuochai/p/5419236.html

  • 相关阅读:
    Code Review
    关于calendar修改前的代码和修改后的代码
    程序员必备的代码审查(Code Review)清单
    一个数组中最大子数组的和并且加上测试用例
    阅读build to win的个人感想
    结对编码(柳祎、张许君)
    Review(patener)
    Review [myself]
    Impressions
    Array
  • 原文地址:https://www.cnblogs.com/huanghuali/p/8489479.html
Copyright © 2011-2022 走看看