CSS Transform - Browser compatibility with animation timing

My CSS animations are working perfectly on WebKit browsers like Safari and Chrome, but the timing is all messed up on Firefox.

JSFiddle: http://jsfiddle.net/jmorais/p5XCD/1/

Here is the code snippet:


var open = false;
  var intransition = false;

  function openCard() {
    intransition = true;
    $('.out').addClass('openingOut');
    $('.in-left').addClass('openingIn');
    setTimeout(function() {
        $('.out').css("z-index", "2");
        $('.in-left').css("z-index", "3");
        }, 850);
    setTimeout(function(){
        $('.out').removeClass('openingOut').addClass('outOpen');
        $('.in-left').removeClass('openingIn').addClass('inOpen');
        open = true;
        intransition = false;
        }, 3000);
  }

function closeCard() {
  intransition = true;
  $('.out').addClass('closingOut');
  $('.in-left').addClass('closingIn');

  setTimeout(function() {
      $('.out').css("z-index", "3");
      $('.in-left').css("z-index", "2");
      }, 1000);
  setTimeout(function(){
      $('.out').removeClass('closingOut').removeClass('outOpen');
      $('.in-left').removeClass('closingIn').removeClass('inOpen');
      open = false;
      intransition = false;
      }, 3000);

}

function toggleCard() {

  if (intransition) { return; }

  if (open) {
    closeCard();
  } else {
    openCard();     
  }
}

...

It seems that the animation timings on Firefox are not synchronized as intended. Any suggestions on how to resolve this issue?

Answer №1

An explanation is not required as the animation effects are consistent in both browsers when tested on stable builds.

Chrome:

19.0.1084.56 (Official Build 140965) m


Firefox:

Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0

It's interesting how this lack of response serves as a response in itself.

To be certain, clear your browser's cache and conduct tests on another computer for validation.

Answer №2

I agree with the point made by arttronics. While you have explored all available CSS3 solutions, I believe there are only two viable options left without relying on CSS3.

  1. One option is to simply wait for Firefox to enhance its performance with CSS3 animation and transitions. I believe this improvement will come sooner rather than later.
  2. Alternatively, consider using an alternative method such as canvas to create the desired animation. Although it may be more challenging, it could be a feasible solution if the animation is crucial.

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

Adjust the message hues upon form submission with Ajax

Can anyone provide assistance? I am in need of a functional form for sending emails. <form enctype="multipart/form-data" role="form" id="form" method="post" action="handler.php"> <div class="form-row"> <div class="form-g ...

What are some ways to customize the appearance of Skype for Business HTML messages when integrating with the Bot Framework?

Recently, I created a bot using Microsoft's bot framework and I've noticed that while it supports sending HTML messages, the CSS styling doesn't seem to work. As a result, the HTML messages appear quite bland and I'm really eager to add ...

What is the best way to add spacing between each button in a Bootstrap 5 navbar?

Is there a way to add spacing between each button in the bootstrap 5 navbar? Currently, the buttons are too close to each other, and I would like to create some space between them. How can I achieve this? <link href="https://cdn.jsdelivr.net/npm/ ...

Implementing Custom Scroll Buttons in Bootstrap Modal Content

Trying to figure out how to create custom scroll up and down buttons for a Bootstrap 4 modal without the scrollbar that was hidden with CSS. I want to provide an easy scrolling option especially for those who might find using the mouse confusing. Is there ...

Are you making the switch to Bootstrap 4 from Bootstrap 3?

Currently, I am utilizing bootstrap 3 in my project. Upon discovering that Bootstrap 4 is a significant overhaul of the entire Bootstrap project, I am contemplating whether it is essential to transition from version 3 to 4. Is there a compelling reason t ...

Error messages are being generated by Angular CLI due to an unclosed string causing issues with the

After incorporating styles from a Bootstrap theme into my Angular 8 project and updating angular.json, I encountered a compile error displaying the following message: (7733:13) Unclosed string 7731 | } 7732 | .accordion_wrapper .panel .panel-heading ...

Stunning CSS Image Showcase

When hovering over my image gallery, it works fine. However, I would like the first image in the gallery to automatically appear in the enlarged section instead of displaying as a blank box until hovered over. <!DOCTYPE html> <html lang="en"> ...

How to eliminate the tiny space between items in a jQuery mobile listview with custom styling

I need help styling my listview so that each item does not appear in a box format. I have tried applying CSS, but there is still a small gap between each list item. Can anyone assist me with this? Here is the CSS code I have been using: .list li { bo ...

Inheriting vertical height and alignment (inline-block)

I struggle to understand how these things work and I would greatly appreciate it if someone could provide an explanation. 1 http://d.pr/i/6TgE+ why http://d.pr/i/UAZn+ *it's actually 9. Here is the code snippet: <header> <div class=" ...

How come my dimensions are not returning correctly when I use offset().top and scrollTop() inside a scrolling element?

Currently in the process of developing a web app at , I am looking to implement a feature that will fade elements in and out as they enter and leave the visible part of a scrolling parent element. Taking inspiration from myfunkyside's response on this ...

Having trouble with the Bootstrap accordion collapse not expanding as expected using CSS

I've been trying to make these collapsibles work, but I'm having no luck. I'm not sure what I'm doing wrong here. I thought it could be my PHP code, but everything seems fine when loading text from the database. Any assistance would be ...

The variants array in VUE.js is not displaying properly

I have recently been delving into vue.js for my work and encountered a significant issue. I wanted to create a simple TODO application. In my index.html file, I only have a div for a header and a root div with an ID: #app. Inside the root div, there is a ...

Enable automatic indentation for wrapped text

I'm still learning the ropes here, but I'm looking to have text automatically indent when it's wrapped. Instead of this: Peter piper picked a peck of pickled peppers. It should look like this: Peter piper picked a peck of pickled pepp ...

What is causing textareas and text input fields inside sortable divs to be uneditable in all browsers except Chrome?

I have a group of draggable elements displayed using the jQuery UI widget. During testing in Chrome, everything works perfectly. However, in other browsers, there seem to be issues. It appears that Chrome handles the functionality better compared to other ...

Ways to modify the color of a chosen item in a Xul listbox?

Is there a way to modify the color of the selected item in a Xul listbox? I attempted this code snippet: listitem:focus { background-color: red; color: red; } However, it does not seem to be working. I've searched through CSS and xul docume ...

The images on the browser are not showing up correctly

I'm struggling to understand why my website appears distorted on Android browsers. Interestingly, it displays perfectly on iOS devices, and occasionally looks fine on some Android phones; however, more often than not, it appears poorly structured. Ch ...

What's the best way to adjust the card column for mobile view resizing?

I am trying to modify the card view for mobile devices to display as a 2-column layout. I have adjusted the flex length and grid size in my code, but I still can't achieve the desired result. Can someone guide me on how to make this change? Current d ...

Opt for text links over browse forms

My requirement is to have a simple text link that triggers a browse-window opening. The idea is that when users click on certain words (such as 'upload an image'), a browser window appears allowing them to select and upload an image of their choo ...

Utilizing LESS for Mixing

I've been diving into the official LESS documentation (version 1.5) and I'm struggling to grasp how I can import a reference to another CSS file to utilize its content in my own stylesheet. For instance: stylesheet.less @import (reference) "boo ...

Crafting a Javascript Email Event: A Step-by-Step Guide

Currently working on a website design project for a friend who requires a "Contact Us Page". I am utilizing Bootstrap Studio and have successfully created a page where users can enter their name and email. However, I am facing difficulties in configuring ...