Certain browsers do not support CSS animation functionality

I'm currently facing an issue where only Firefox is able to animate the JSFiddle provided below.

Although I've included all necessary options for different browsers, it seems like something is not configured correctly :((

FIREFOX 27: WORKING

CHROME 33: NOT WORKING

IE 11: NOT WORKING

SAFARI (IPHONE): NOT WORKING

JSFIDDLE: http://jsfiddle.net/Musicman/g7e34/

MYCODE:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>

<style type="text/css">
    #wrapper {
    width: 250px;
    height: 40px;
    background-color: #383838;
    color: red;
    }
    .nowPlayAnimate {
    position:absolute;
    white-space:nowrap;
    overflow: hidden;
    -moz-animation: slidein 1s infinite linear alternate;
    -webkit-animation: slidein 1s infinite linear alternate;
    -o-animation: slidein 1s infinite linear alternate;
    animation: slidein 1s infinite linear alternate;
    }
    @-moz-keyframes slidein {
        from {
            transform:translateX(0);
        }
        to {
            transform:translateX(calc(-100% + 250px)); /* -100% + parent width */
            }
    }
    @-webkit-keyframes slidein {
        from {
            transform:translateX(0);
        }
        to {
            transform:translateX(calc(-100% + 250px));
    }
    }
    @-o-keyframes slidein {
        from {
            transform:translateX(0);
        }
        to {
            transform:translateX(calc(-100% + 250px));
        }
    }
    @keyframes slidein {
        from {
            transform:translateX(0);
        }
        to {
            transform:translateX(calc(-100% + 250px)); 
        }
    }
</style>
</head>

<body>
<div id="wrapper">
    <div id="list0title" class="nowPlayAnimate"></div>
</div>

<div id="wrapper">
<div id="list0artist" class="nowPlayAnimate"></div>
</div>

<script>
var testtext="Animation";
    document.getElementById("list0title").innerHTML=testtext;
var testtext="More Animation";
    document.getElementById("list0artist").innerHTML=testtext;
</script>
</body>
</html>

Thanks!!

Answer №1

Check out the Demo

You have missed using the browser-specific syntax for the properties.

Currently, you are doing it like this:

@-webkit-keyframes slidein {
    from {
        transform:translateX(0);
    }
    to {
        transform:translateX(calc(-100% + 250px));
    }
}

The correct way is to include -webkit-transform before the transform property, like this:

@-webkit-keyframes slidein {
    from {
        -webkit-transform:translateX(0);
    }
    to {
        -webkit-transform:translateX(calc(-100% + 250px));
    }
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Balancing spaces in flexbox

In this scenario, no matter what value is assigned to justify-content, it is difficult to horizontally align the elements around their gaps. * { box-sizing: border-box; margin: 0; padding: 0; } html, body { height: 100%; } body, div { display: f ...

What are some strategies for creating a website that caters to both web crawlers and users of single page applications?

Let's get down to the specifics. I've got a frontend website at (don't worry, it's not porn). If you have javascript enabled, the URL becomes [this uses jquery/ajax load]. If you're without javascript, the URL remains as . To ...

Looking for a custom header logo that seamlessly blends with your image slider?

I'm just starting to learn about HTML and I'm trying to create a header with a logo overlapping on an image slider. I followed the method mentioned in this post: How would you make two <div>s overlap? Unfortunately, I'm still having t ...

Encountering a problem with the persistent JavaScript script

I have implemented a plugin/code from on my website: Upon visiting my website and scrolling down, you will notice that the right hand sidebar also scrolls seamlessly. However, when at the top of the screen, clicking on any links becomes impossible unless ...

Obtaining a variable from HTML and passing it to Node.js

Currently, I am utilizing express to handle form submissions. Within my HTML file, there are 20 inputs with unique ids such as address1, address2, address3, and so on. In my node js code, I access these input values using req.body.address1. Users have th ...

React - utilize a variable as the value for an HTML element and update it whenever the variable undergoes a change

I'm on a mission to accomplish the following tasks: 1.) Initialize a variable called X with some text content. 2.) Render an HTML paragraph element that displays the text from variable X. 3.) Include an HTML Input field for users to modify the content ...

What is the best way to ensure that <input> and <textarea> placed within a <div> are aligned to the top of the container?

Here is the setup I currently have: <div> <input> <input> <textarea> </div> I am looking to align the tops of the inputs and the textarea within the div. However, it seems like the inputs are at the bottom and the t ...

Search for the specified pattern in BBEdit and delete the entire table that matches

While I am not an expert, I recently acquired BBEdit for a specific project. My current task involves working on an HTML file that contains numerous entries I need to eliminate. Specifically, I want to remove all tables that contain the text "NOT CONVERTE ...

Is there a way to navigate through div text within a stationary container?

My current challenge involves a container that contains an overflow of text, but I desire for the container to remain fixed. The dilemma arises when the text spills out from both the top and bottom edges of the container. Instead of using scroll bars withi ...

Complete and submit both forms during a single event

Essentially, I have an event called onclick that takes form data and stores it in a variable. When another function is executed by the user, I want to send that variable through ajax within the function. This is the onclick event (first form): $('#n ...

I am looking to conceal an element as soon as a list item is scrolled into view and becomes active

Is it possible to hide a specific element when the contact section is activated on scroll, and have it visible otherwise? How can this be achieved using Jquery? <ul class="nav navbar-nav navbar-right navmenu"> <li data-menuanchor="ho ...

Common Error for Novice HTML/CSS Learners

I am currently enrolled in an introductory web design course on Treehouse, and I have encountered a problem with centering a class in HTML using CSS. Despite following the instructions closely, my code is not displaying correctly. Can someone please review ...

Utilizing CSS in Angular to Conceal Background Images in the Project

CSS and HTML. Encountering an issue with the structure of my Angular project in the home.component.html file: <div id="homecontent"> <div class="imageslide"> <ng-image-slider [images]="imageObject" [imageSize]="{width: &apo ...

Switching background images on click with a smooth transition

I'm in the process of creating a website and I want to be able to change background images with ease when clicked, like using fade in or fade out effects. The onclick functionality is already implemented with jQuery, but I'm having trouble incor ...

Create a dynamic pulse line on an HTML5 Canvas

Hello everyone, I've been attempting to grasp HTML5 Canvas animation without much success. I was hoping to create the shape below by animating a custom shape every 10 seconds interval. Unfortunately, I got lost in the math and ended up manually writi ...

Attempting to resolve the Bootstrap issue, currently in search of a suitable solution

Today I made the decision to utilize bootstrap to create a menu, but unfortunately, I've encountered a strange bug or conflict involving jQuery, potentially the UI, and Bootstrap. If you'd like, you can take a look at the picture provided in the ...

The img:first-of-type selector targets specifically the first image within a group

When a user visits my website using a touch device or without Javascript support, I want the first of two images to display. To achieve this, I am targeting them using Modernizr. The menu button at the top of the page: <img src="menubutton.png" alt="M ...

What is the method for including a TabIndex property in a JSON file?

https://i.sstatic.net/ISi72.png I discussed the integration of HTML fields within a JSON file and highlighted how to utilize the TabIndex property effectively in JSON files. ...

JSFiddle showcasing the Bootstrap grid system

I'm having trouble implementing bootstrap's grid system on jsfiddle. Check it out on jsfiddle I've tried using the example from the bootstrap documentation: <div class="row"> <div class="col-md-1">.col-md-1</div> ...

Is it possible to accomplish this using a list or a table in HTML/CSS?

I am currently working on creating a visual representation of a color catalog using hyperlinked images. My goal is to have a layout that displays the colors in a grid format, similar to this: However, the number of images per row may vary depending on the ...