The `webkit-animation-fill-mode` property does not seem to be functional in Firefox

I attempted to create a progress bar design using webkit animation fillmode, but unfortunately, it is not compatible with Firefox.

I also tried converting % values to pixels, but the issue persisted.

<!doctype html>

<html>
<head>

<style rel="stylesheet">
    #progressbar {
      background-color: #e3e5e6;
      border-radius: 8px;
      padding: 0px;
      width: 400px;
    }

    #progressbar div {
      background-color: #afd163;
      height: 10px;
      width:0%;
      border-radius: 5px;
      border-top-right-radius:0px;
      border-bottom-right-radius:0px;
      animation:loadbar 2s;
      -webkit-animation:loadbar 2s;
      -webkit-animation-fill-mode: forwards;
      animation-fill-mode: forwards;
    }

    @-webkit-keyframes loadbar {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }

    @keyframes loadbar {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

</style>
</head>

<body>
    <div id="progressbar">
    <div></div>
</div>
</body>

</html>

Answer №1

Update: Oops, I made a mistake. The issue you are facing is not related to vendor prefixes but rather a missing closing brace in your code:

@-moz-keyframes loadingbar {
  0% {
     width: 0%;
  }
  100% {
    width: 100%;
  }
}

@keyframes loadingbar {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

This should resolve the issue ;) . Firefox currently supports the unprefixed animation property.

However, it's still advisable to include other vendor prefixes for compatibility purposes - not everyone keeps their browsers updated regularly.

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

What could be the reason behind the malfunctioning of my media query in the

I am trying to connect an external stylesheet to my React component in order to apply different styles based on screen width. Specifically, when the screen width is less than 300px, I want the logo to have a height of 100vh. However, it seems that the medi ...

Wrapping a series of grids within a parent container to manage height effectively with grid960

Testing on the following browsers: Internet Explorer, Chrome, Firefox; Check out this example of an ideal layout in a PDF: Here is the link to the direct page: While Grid systems work well for width layout, I struggle with setting height constants. In ...

The selected Google Font Family remains unchanged

After taking a break, I decided to dive back into web development in order to create a simple webpage. My starting point is Bootstrap, and I am constructing my page based on that framework. However, I'm facing an issue with changing the font family of ...

Tips for creating a responsive div that contains both an image and description, including automatically resizing the image to fit the

#content { background-color: #ACAE4C; float: right; display: inline-block; padding: 0; } <div id="content"> <div class="pic"></div> <div class="desc"></div> </div> I need assistan ...

Encountering a TypeError while trying to implement a dropdown button feature in Bootstrap 5

I'm attempting to implement a Dropdown button using Bootstrap 5, but encountering an error: Uncaught TypeError: t.createPopper is not a function Here is the HTML code I am using: <div class="dropdown"> <a class="btn btn- ...

Error with displaying icon font within a box in Internet Explorer

Utilizing Wordpress with the UDesign theme has allowed me to incorporate iconfonts on my website within small blue boxes. You can view these icons in action on this page: To achieve this look, I had to customize the CSS by following an online tutorial tha ...

Banner advertisement on a webpage

Currently, I am working on a website project for clients who are interested in having background ads displayed throughout the entire site. In terms of coding this feature with CSS, it is relatively straightforward: body { background-image: url('a ...

Incorporate spacing between columns in Bootstrap 5 by adding gutters

I've been exploring ways to incorporate spacing between my columns in Bootstrap 5. I diligently followed the guidelines provided in the documentation, but I'm facing difficulties in adding gutters between my columns. Currently, I am utilizing g- ...

"Implementing interactive arrow buttons in a horizontal navigation bar using HTML, CSS, and JavaScript

Seeking advice on creating a horizontal navigation bar with arrow buttons at the sides, such as the one shown below. Despite extensive research, I have not found the exact solution I am looking for. This will be implemented in my Vue.js project. |<| P ...

Rendering High-quality Images in Internet Explorer Browser

Currently, I am working on optimizing my website for high resolution monitors, particularly the new iPad. The site is already formatted to my liking, with images having increased resolutions while still fitting into specific DIVs. For instance, an image wi ...

Enhancing Image Quality in Microsoft Edge

I'm trying to figure out how to make an image scale with bicubic in MS Edge. Is there a CSS solution or something similar that can change this behavior? Check out this page: On the right side of the page, there are two images with textured backgroun ...

Is it possible to stack CSS pseudo-elements?

What is the most efficient way to create nested square-elements with minimal markup? I am aware that :after/:before cannot be stacked multiple times on the same element, so what would be the best way to achieve a structure like this? I am also facing chal ...

I am having trouble setting margins for a sticky position in a WordPress website

Can someone help me reposition the left-sidebar with a sticky top to be below the main header when scrolling down? Adding margin-top to sticky-top under col-sm-1 is not working. <style> .col-sm-1 .sticky-top { margin-top: 50px} </style> ...

Issues with the appearance of CSS styles on a Firebase site

After deploying a SPA in Firebase, I noticed that the CSS styles only appear correctly after refreshing the browser. I have created a short video demonstrating the issue: https://www.youtube.com/watch?v=dIuQ-axizj8 This is my firebase.json configuration: ...

Using Angular's [ngIf], [ngIfElse], and [ngIfElseIf] functionalities enables dynamic content rendering

Currently, I have the following code snippet: <ng-container *ngIf="someCondition"> <ng-template [ngIf]="cd.typedType === 'first'" [ngIfElse]="Second"> <div class="row"> fir ...

What causes the layout of an application to become distorted when I extend the theme in Tailwind.css?

I had the idea of incorporating an animation into my website design using tailwind.css for styling. module.exports = { content: ["./index.html", "./src/**/*.{js,jsx}"], theme: { colors: { primary: "#E51114", ...

Automatic keyboard suggestions not working for HTML search input using Ajax

I am currently working on a PHP web application that uses a MySql database. I have implemented a search suggestion box using ajax. The issue I am facing is that the suggestions can be selected with the mouse and auto-completed, but not when using the keybo ...

Ensure that the <td> element remains within the confines of the window

When creating a table with some content, I encountered an issue where long strings would extend beyond the window. I attempted to set max-width: 80%; to limit the length, and also tried setting td, th = width: 240px;, but the problem persisted. Next, I ex ...

Enhance the appearance of div reflection with additional flair

Attempting to enhance a div with a reflection using the following CSS: CSS :: div.reflection { -webkit-transform: scaleY(-1); -moz-transform: scaleY(-1); -o-transform: scaleY(-1); -ms-transform: scaleY(-1); transform: scaleY(-1); ...

Navigation Menu Dropdown Present on the Right Side and Arranged in a Horizontal Stack

I'm having trouble with a dropdown menu in my navigation bar. I followed the example on W3Schools but when I hover, the menu appears horizontally instead of vertically and to the far right of the page. I've searched for solutions but can't s ...