javascript - un élément HTML qui peut osciller de haut en bas
某草草
某草草 2017-05-19 10:44:32
0
4
538

Site Web http://zm.163.com/

Comment obtenir cet effet

某草草
某草草

répondre à tous(4)
仅有的幸福

est une simple animation CSS3

.light_pc {
        width: 93px;
        height: 9px;
        position: absolute;
        top: 0;
        left: 50%;
        margin-left: -46px;
        background: url(https://zm.res.netease.com/pc/fab/20161226201931/img/light_pc_f3d5dee.png?_sprite) no-repeat;
        -moz-animation: light_pc 4s linear 0s infinite;
        -webkit-animation: light_pc 4s linear 0s infinite;
        -o-animation: light_pc 4s linear 0s infinite;
        -ms-animation: light_pc 4s linear 0s infinite;
        animation: light_pc 4s linear 0s infinite
    }
    
    @-webkit-keyframes light_pc {
        0% {
            top: 0
        }
        50% {
            top: 83px
        }
        100% {
            top: 0
        }
    }
    
    @-moz-keyframes light_pc {
        0% {
            top: 0
        }
        50% {
            top: 83px
        }
        100% {
            top: 0
        }
    }
    
    @-ms-keyframes light_pc {
        0% {
            top: 0
        }
        50% {
            top: 83px
        }
        100% {
            top: 0
        }
    }
    
    @-o-keyframes light_pc {
        0% {
            top: 0
        }
        50% {
            top: 83px
        }
        100% {
            top: 0
        }
    }
    
    @keyframes light_pc {
        0% {
            top: 0
        }
        50% {
            top: 83px
        }
        100% {
            top: 0
        }
    }
PHPzhong

Affichez les éléments et apprenez-en plus sur l'animation CSS

伊谢尔伦

Il y a un p à l'extérieur de l'image du code QR qui correspond à la hauteur de l'image
Utiliser : avant
pour faire une ligne horizontale
Écrire un mouvement d'animation CSS3

Ty80

Je publierai également mon animation

  demo {
  transform: translate3d(0, 0, 0);
  animation: bounce 0.8s infinite ease-out;
}
@-webkit-keyframes bounce {
  50% {
    transform: translate3d(0, -0.2rem, 0);
  }
}
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!