欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

animate.css

程序员文章站 2022-04-14 14:41:52
...
这是个css3动画框架,现在很流行,在小动画效果有很多,使用的方式
div class="animated bounce">div>

/*只要修改bounce这个类就可以*/

一、atention Seekers

1、bounce

animate.css

2、flash

animate.css

3、pulse

animate.css

4、rubberBand

animate.css

5、shake

animate.css

6、swing

animate.css

7、tada

animate.css

8、wobble

animate.css

9、jello

animate.css

二、Bouncing Entrances

1、bounceIn

animate.css

2、bounceInDown

animate.css

3、bounceInLeft

animate.css

4、bounceInRight

animate.css

5、bounceInUp

animate.css

三、Bouncing Exits

1、bounceOut

animate.css

2、bounceOutDown

animate.css

3、bounceOutLeft

animate.css

4、bounceOutRight

animate.css

5、bounceOutUp

animate.css

四、Fading Entrances

1、fadeIn

animate.css

2、fadeInDown

animate.css

3、fadeInDownBig

animate.css

4、fadeInLeft

animate.css

5、fadeInLeftBig

animate.css

6、fadeInRight

animate.css

7、fadeInRightBig

animate.css

8、fadeInUp

animate.css

9、fadeInUpBig

animate.css

五、Fading Exits

1、fadeOut

animate.css

2、fadeOutDown

animate.css

3、fadeOutDownBig

animate.css

4、fadeOutLeft

animate.css

5、fadeOutLeftBig

animate.css

6、fadeOutRight

animate.css

7、fadeOutRightBig

animate.css

8、fadeOutUp

animate.css

9、fadeOutUpBig

animate.css

六、Flippers

1、flip

animate.css

2、flipInX

animate.css

3、flipInY

animate.css

4、flipOutX

animate.css

5、flipOutY

animate.css

七、Lightspeed

1、lightSpeedIn

animate.css

2、lightSpeedOut

animate.css

八、Rotating Entrances

1、rotateIn

animate.css

2、rotateInDownLeft

animate.css

3、rotateInDownRight

animate.css

4、rotateInUpLeft

animate.css

5、rotateInUpRight

animate.css

九、Rotating Exits

1、rotateOut

animate.css

2、rotateOutDownLeft

animate.css

3、rotateOutDownRight

animate.css

4、rotateOutUpLeft

animate.css

5、rotateOutUpRight

animate.css

十、Sliding Entrances

1、slideInUp

animate.css

2、slideInDown

animate.css

3、slideInLeft

animate.css

4、slideInRight

animate.css

5、slideOutUp

animate.css

6、slideOutDown

animate.css

7、slideOutLeft

animate.css

8、slideOutRight

animate.css

十一、Zoom Entrances

1、zoomIn

animate.css

2、zoomInDown

animate.css

3、zoomInLeft

animate.css

4、zoomInRight

animate.css

5、zoomInUp

animate.css

十二、Zoom Exits

1、zoomOut

animate.css

2、zoomOutDown

animate.css

3、zoomOutLeft

animate.css

4、zoomOutRight

animate.css

5、zoomOutUp

animate.css

十三、specials

1、hinge

animate.css

2、rollIn

animate.css

3、rollOut

animate.css

奉上测试代码:

DOCTYPE html>
html lang="en">
head>
    meta charset="UTF-8">
    title>animationtitle>
    link rel="stylesheet" href="./animate.css">
    style>
    div{
        width: 100px;
        height: 100px;
        margin: 100px;
        margin-bottom: 50px;
        background: #0ff0f0;
    }
    input[type="text"]{
        outline: none;
        width: 188px;
        height: 48px;
        border: 2px solid #888;
        border-radius:10px; 
        text-align: center;
        font-weight: bold;
        font-size: 16px;
        margin-left:55px; 
    }
    input[type="button"]{
        width: 120px;
        height: 40px;
        font-family: "黑体";
        text-align: center;
        font-weight: bold;
        outline: none;
        border: 2px solid #00FFFF;
        background: #fff;
        color: #00FFFF;
        font-size: 14px;
        cursor: pointer;
        border-radius: 5px;
        margin-left:50px; 
    }
    style>
head>
body>
    div>div>
    input type="text">
    input type="button" value="Animate it">
    script>
        var oBtn=document.getElementsByTagName("input")[1]; 
        var oDiv=document.getElementsByTagName("div")[0];
        var oText=document.getElementsByTagName("input")[0];
        oBtn.onclick=function(){
        oDiv.className="animated rollOut";
        var arr=oDiv.className.split(" ");
        oText.value=arr[1];
        setTimeout(function(){oDiv.className=""},1000);
        }
    script>
body>
html>

相关标签: animate.css