zoukankan      html  css  js  c++  java
  • 如何实现1920bannerai网页中居中以及实现1920bannerai网页中切换的效果

    #banner{
        /*宽度,浏览器的100%*/
         100%;
        /*原则上,高度=图片高度*/
        height: 500px;
        position: relative;
        overflow: hidden;
       }
       #banner img{
        /*宽度,图片的实际高度*/
         1920px;
        /*高度,充满父容器*/
        height: 500px;
        /*使用定位,让图片在父容器绝对居中*/
        position: absolute;
        left: 50%;
        margin-left: -960px;
       }

    *{
        margin: 0px;
        padding: 0px;
       }
       
       #banner{
         100%;
        height: 500px;
        overflow: hidden;
       }
       
       #banner_in{
         7680px;
        height: 500px;
        position: relative;
        -webkit-animation: banner 8s ease infinite;
       }
       
       @-webkit-keyframes banner{
        /*0%{
         left:0px
        }
        
        33%{
         left: -1920px;
        }
        
        66%{
         left: -3840px;
        }
        
        100%{
         left: -5760px;
        }*/
        
        0%{
         left: 0px;
        }
        10%{
         left: 0px;
        }
        
        30%{
         left: -1920px;
        }
        40%{
         left: -1920px;
        }
        
        
        70%{
         left: -3840px;
        }
        80%{
         left: -3840px;
        }
        
        100%{
         left: -5760px;
        }
       }
       <body>
      
      <div id="banner">
       <div id="banner_in">
        <img src="../img/banner1.png" /><!--
        --><img src="../img/banner2.png" /><!--
        --><img src="../img/banner3.png" /><img src="../img/banner1.png" />
       </div>
      </div>
      
      
      
     </body>

  • 相关阅读:
    面试准备
    论文投稿Cover letter
    Pycharm 快捷键
    linux下常用命令:
    Qt中数据模块学习
    Qt 多线程和网络编程学习
    VS高效开发快捷键
    良好编码风格习惯整理
    Qt QAxObject操作excel文件过程总结(转):
    Qt开发中的实用笔记三--关于各种类的零碎知识点:
  • 原文地址:https://www.cnblogs.com/lwhvicky/p/6686871.html
Copyright © 2011-2022 走看看