zoukankan      html  css  js  c++  java
  • 利用css3的动画实现图片轮播

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>lunbo</title>
    </head>
    <style type="text/css">
        *{margin:0;padding:0;}
        .d0{100px;height:100px;margin:100px;
            border:1px solid red; position:relative;}
        .d1{400px;height:100px;position:absolute;
            animation:lunbo 5s linear infinite;animation-direction:normal;}
        .d2{background:green;}
        .d3{background:red;}
        .d4{background:blue;}
        .d2,.d3,.d4{100px;height:100px;float:left;/*display:inline-block;*/}
    
        @keyframes lunbo{
            0%{left:0px;}
            55%{left:-100px;}
            75%{left:-200px;}
            100%{left:-300px;}
        }
    </style>
    <body>
        <div class="d0"><!--100-->
            <div class="d1"><!--400-->
                <div class="d2">1</div><!--100-->
                <div class="d3">2</div>
                <div class="d4">3</div>
                <div class="d2">1</div>
            </div>
        </div>
    </body>
    </html>
    

      三个色块的轮播示例

  • 相关阅读:
    左右布局,中分线可以左右拖动
    ES6
    nodeclub route
    nodeclub models
    mybatis中sql语句查询操作
    mybatis开发dao的方式
    Mybatis框架入门
    Maven
    Android开发-ADT Bundle安装
    人类史一览
  • 原文地址:https://www.cnblogs.com/liao13160678112/p/6473541.html
Copyright © 2011-2022 走看看