Chrome not showing animated FontAwesome icons within anchor elements

Need help with animating a fontawesome icon? I ran into an issue where the animation works perfectly inside a span element, but it stops working when placed inside an anchor tag in Chrome. Interestingly, it still works fine on IE.

I am currently utilizing FontAwesome 3.2.1 for this task. Here's the code snippet:

HTML:

<a>
    <i class="icon-wrench rotator"></i> 
</a>

CSS:

.rotator {
    display: inline-block;
    -webkit-animation: rotate 2.5s 4 ease;
    -webkit-transform-origin:90% 35%;
}

@-webkit-keyframes rotate {
    from {
        -webkit-transform: rotate(-12deg);
    }

    to {
        -webkit-transform: rotate(112deg);
    }
}

I noticed that the animation works flawlessly with FontAwesome 3.0.2. However, upon upgrading to 3.2.1, the animation stopped functioning properly – specifically on Chrome.

Any insights or solutions would be greatly appreciated!

Edit I also have additional HTML elements within the anchor tag that I prefer not to rotate along with the icon, so simply adding the 'rotator' class to the anchor won't suffice.

Edit For context, here's the complete HTML structure (the previous example was simplified):

<a href="#" class="dropdown-toggle" data-toggle="dropdown">
    <i class="icon-bell-alt icon-animated-bell icon-only"></i>
    <span class="badge badge-success">5</span>
</a>

Answer №1

Try adding the rotator class directly to the anchor element instead. It should start rotating when the page loads, if that's what you're aiming for?

http://jsfiddle.net/7kANu/4/

<a class="rotator">
    <i class="icon-wrench"></i> 
</a>

UPDATE: Could you try wrapping the icon in a div and applying the rotator class to that as a temporary solution?

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 is the correct method for caching fonts within an Angular application?

In the process of developing a web application similar to photoshop-minis using Angular, one key aspect I am focusing on is reducing load times. Particularly when it comes to fonts, as not all necessary fonts are available through Google Fonts. Instead of ...

Card flip animation using RotateY is experiencing delays in loading

While experimenting with jQuery and CSS3 animations, I encountered a strange issue. When hovering over the card or focusing on the CCV field in my pen, there is a delay in the color transition when the card flips over. It almost seems like it's loadin ...

how to remove product listing from main category in magento

Can anyone help me figure out how to disable the product listing in Magento (version 1.4) Top Categories? I'm open to any ideas or tips on how to best accomplish this task. Thank you! ...

Assistance with changing styles

Hey there, I could really use some assistance. I've created a style switcher, but I'm struggling to figure out how to replace the stylesheet properly. Currently, my code empties the <head> element when what I really need is for it to simply ...

When triggered by a click, the function gradually fades in and out. It superimposes one image on top of another, but unfortunately, the sizes

Due to different screen sizes, the image does not appear on top of another image exactly. It seems like a new function is needed. One that does not overlap with another image (by clicking the function for a few seconds), but rather replaces it for those fe ...

What is the best way to implement multiple store filters in VueJS?

Just dipping my toes into the world of VueJS with my very first major project. I've incorporated 2 filters in this project for my elements - one is a search bar and the other involves checkboxes. Taking a look at my code, you'll notice a computed ...

Distinct headings break up two-columned lists

Is there a way to ensure that the h2 header always stays with its list items, even if the number of list items varies? Currently, the header appears in one column and the lists appear in another column, causing them to be separated when the list count chan ...

Updating the color of the hamburger menu based on the scroll position using an event listener

Is there a way to change the color of my burger bar lines using event listeners? I'm trying to target the spans that make up the burger menu lines by assigning them a class "span". Here's what I have: var distFromTop = document.querySelector(".o ...

Styles applied in the child component will have a cascading effect on the entire webpage

My webpage is divided into two parts: child1 and child2. Page Hierarchy: Parent Child1 Child2 Here are the CSS styles included in the page: Child1 -> z-index: 1 Child2 -> z-index: 2 What I want to achieve is to add a backdrop to the entire ...

What is the best way to insert a block of text above a slideshow without causing it to move downwards?

I've successfully integrated a slideshow within a section tag using a div tag. To include text above the slideshow, I placed another div tag above the slideshow div. However, when adding more text, it causes the images in the slideshow to get pushed d ...

Menu Sliding Down Beyond Container Borders

I am currently working on a jQuery slideDown menu and facing an issue with its width restriction. Despite positioning it to the left with no float, the width seems to be limited. Below is the media query I am using: @media only screen and (min-width: 480 ...

Positioning the navigation menu in the center

I'm facing a bit of trouble trying to center a navigation bar on my Blogger site. Usually, this is a simple task, but for some reason, it's proving difficult this time around. Feel free to check out the website in question: Center Navigation I& ...

Customize Angular Material styles uniquely across various components

Within my application, I am utilizing two components that contain tab groups. The first component serves as the main page, where I have adjusted the CSS to enlarge the labels by using ViewEncapsulation.None. The second component is a dialog, and I aim to m ...

JavaScript Cookie to Ensure Form Submission is Limited to a Single Instance

Seeking assistance with automatically submitting a form on page load using JS cookies. Here is the code I have, but it's not functioning as expected. Any guidance would be greatly appreciated. Thank you. I'm unsure about the section in my code th ...

Value of PHP checkboxes

Similar Question: Submitting an HTML form with unchecked checkboxes I am attempting to send some information to the database. I am struggling to send the checkbox value in the form to the database using the following code snippet: <input type=&apo ...

Is it possible to perform a CSS flip animation without delay?

Trying to implement David Walsh's CSS flip effect for an image that should change to another without requiring a mouseover. Is there a way to trigger it automatically, maybe in 3 seconds? I'm new to this so any help would be greatly appreciated! ...

Double-Lined Top Bar Design with Foundation 5 (CSS)

My current goal: The requested code: <div class="contain-to-grid"> <nav class="top-bar" data-topbar role="navigation"> <ul class="title-area"> <li class="name"><h1><a href="#">LOGO</a></h1>< ...

Adjust the size of the image to fit within the div container following

<div id="homePage" style="position: relative; margin: 0px; width: 320px; height: 420px;"> <img id="userImg" src="images/5.jpg" width="100%" height="100%" onclick="imageClick()" style=" z-index: -1; margin: 0 ...

Having trouble getting CSS headers to work smoothly with iPhone?

After creating a web application with CSS, the initial GUI was exactly how I wanted it to be. However, within 3 seconds of loading the page, the GUI would change. The HTML code for my header is as follows: <div id="Slideshow"> <img src="image/s1 ...

Placing a FontAwesome icon alongside the navigation bar on the same line

Upon login, the navigation bar experiences display issues. Prior to logging in: https://i.stack.imgur.com/ZKyGe.jpg Following successful login: https://i.stack.imgur.com/zyP3m.jpg An obstacle I'm facing involves the Log Out fontawesome icon wrappi ...