Run CSS3 animation only once (at page loading)

后端 未结 7 1579
面向向阳花
面向向阳花 2020-12-04 19:11

I\'m making a simple landing page driven by CSS3. To make it look awesome there\'s an plopping up:

@keyframes splash {
    from {
             


        
7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 19:42

    It can be done with a little bit of extra overhead.

    Simply wrap your link in a div, and separate the animation.

    the html ..

    me!

    .. and the css ..

    .animateOnce {
        animation: splash 1s normal forwards ease-in-out;
    }
    
    .animateOnHover:hover {
        animation: hover 1s infinite alternate ease-in-out;
    }
    

提交回复
热议问题