1.2. I created CSS variables for animation & direction, now you just have to put the variable name on the place where we want the same value. HTML Marquees vs CSS Marquees. Prenons quelques exemples. We do this by adding alternate to the animation code. For horizontally scrolling the text, use the "marquee 10s linear infinite;" value for the animation property (change the seconds according to your needs). L'animation proprement dite est définie en utilisant la propriété animation. Dans cet exemple simple, on met en forme l'élément afin que le texte passe de la droite vers la gauche de l'écran. Les propriétés CSS détaillées permettent d'utiliser plusieurs valeurs, séparées par des virgules. To make the marquees fully W3C compliant, remove the vendor prefixes and their respective code (i.e. The basics are easy enough, we start out with a wrapping container and a scrolling child element. With the help of CSS, you can also create vertical scrolling with slide-in-text. Dans la règle @ @keyframes, on manipule la largeur et la marge à gauche de l'élément afin que ce dernier traverse l'écran. Keyframes hold what styles the element will have at certain times. Ce code est plutôt classique, n'hésitez pas à consulter la documentation de eventTarget.addEventListener() si besoin. Demo Image: Animated Highlighted Text Animated Highlighted Text. Feel free to modify the code to suit your own needs. 7. the bits that have -webkit-and -moz-in them). Celle-ci est définie en utilisant des règles CSS de mise en forme au sein de la règle @ @keyframes comme décrit ci-après. Sujet résolu. To make a scrolling image, simply replace the text with an image. Il devrait fonctionner mais n'est pas actif ce jour ? Dans ce premier exemple, on a uniquement deux étapes. On voit également que, lors de la fin de l'animation, l'événement animationiteration n'est pas envoyé, seul animationend est déclenché. You may also create bouncing text. Let’s recreate some marquee’ish effects in CSS! CSS marquees are replacing HTML marquees as the standard method for creating scrolling, bouncing, or slide-in text and images. Quel est l'intérêt ? Equivalent