Andy Andy - 3 months ago 11x
HTML Question

image with href css animation (banner) not working (only in FireFox)

I am using CSS keyframe and animation to make an auto-scroll banner (with

move out of
@keyframes teammove { 0% { margin-left: 0px; } 100% { margin-left: -1200px; }
). Unfortunately it doesnt work on in firefox.

I tested with different size div and overflow setting, and eventually found it is the problem of the
<a href = ""> </a>

Here are both working (without href) and non-working (with href) version of banner. Any solution would be helpful.

Working version:

non-working version:

Vir Vir

You can try to use javascript onclick event with image first and with image second calling function like,

 <!DOCTYPE html>

   <p>Click the button to set the href value to</p>

    <button onclick="myFunction()">Take me to</button>

       function myFunction() {
       location.href = "";


Use like,

    <img onclick="myFunction()" src="" width="300" height="200" class="firstimg">
    <img onclick="myFunction()" src="" width="300" height="200">