zoukankan      html  css  js  c++  java
  • css3动画从底部向上升

    animation-fill-mode: forwards;/*当动画完成时,动画会停留在最后一帧。*/

    升起来前

    升起来后


    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
    body,ol,ul,h1,h2,h3,h4,h5,h6,p,th,td,dl,dd,form,fieldset,legend,input,textarea,select{margin:0;padding:0}
    body{font:14px"微软雅黑","Arial Narrow",HELVETICA;background:#fff;-webkit-text-size-adjust:100%;}
    li{list-style:none}
    li{
    float: left;
    25%;
    height: 200px;
    text-align: center;
    }
    img{
    200px;
    height: 200px;
    }
    .head{
    100%;
    height: 200px;
    position:absolute;
    animation:myfirst 2s;
    -webkit-animation:myfirst 2s;
    animation-fill-mode: forwards;/*当动画完成时,动画会停留在最后一帧。*/
    overflow: hidden;
    }
    @-webkit-keyframes myfirst /* Safari and Chrome */
    {
    0% {height: 10px}
    25% {height:50px;bottom:50%;}
    50% {height:100px;bottom:50%;}
    75% {height:160px; bottom:50%;}
    100% {height:200px;bottom:50%;
    }
    }
    </style>
    </head>
    <body>
    <div class="head">
    <ul>
    <li>
    <img src="image/hb.png">
    </li>
    <li>
    <img src="image/jiang.png">
    </li>
    <li>
    <img src="image/kf.png">
    </li>
    <li>
    <img src="image/tubiao1.png">
    </li>
    </ul>
    </div>
    </body>
    </html>
  • 相关阅读:
    POJ 1044: Date bugs
    POJ 1017: Packets
    POJ 1014: Dividing
    POJ 1012: Joseph
    POJ 1011: Sticks
    POJ 1008: Maya Calendar
    POJ 1005: I Think I Need a Houseboat
    为什么要自动化测试
    微软CodeDom模型学习笔记(全)
    概念完整性
  • 原文地址:https://www.cnblogs.com/yuanyuan-1994/p/8781862.html
Copyright © 2011-2022 走看看