What could be causing the animation-delay to malfunction specifically on iOS devices?

The code snippet below works perfectly in most environments, but I am facing an issue in iOS. I suspect the problem lies in the animation delay, as some paragraphs are being animated simultaneously. You can view a demo here (look for the words coming out of the left dragon's head).

Any insights on what might be causing this issue? Your help is greatly appreciated. Thank you!

.dragon-speech:nth-of-type(1){
    -webkit-animation-name: dragon-speech_animation;
    -moz-animation-name: dragon-speech_animation;
    -ms-animation-name: dragon-speech_animation;
    -o-animation-name: dragon-speech_animation;
    animation-name: dragon-speech_animation;
    -webkit-animation-duration: 10s;
    -moz-animation-duration: 10s;
    -ms-animation-duration: 10s;
    -o-animation-duration: 10s;
    animation-duration: 10s;
    -webkit-animation-timing-function: linear;
    -moz-animation-timing-function: linear;
    -ms-animation-timing-function: linear;
    -o-animation-timing-function: linear;
    animation-timing-function: linear;
    -webkit-animation-delay: 0.2s;
    -moz-animation-delay: 0.2s;
    -ms-animation-delay: 0.2s;
    -o-animation-delay: 0.2s;
    animation-delay: 0.2s;
    -webkit-animation-iteration-count: infinite;
    -moz-animation-iteration-count: infinite;
    -ms-animation-iteration-count: infinite;
    -o-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
    -ms-animation-fill-mode: forwards;
    -o-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
}

.dragon-speech:nth-of-type(2){
    /*same properties as above with different delay*/
}

.dragon-speech:nth-of-type(3){
    /*same properties as above with different delay*/
}

.dragon-speech:nth-of-type(4){
    /*same properties as above with different delay*/
}

.dragon-speech:nth-of-type(5){
    /*same properties as above with different delay*/
}
<p class="dragon-speech">Fly!</p>
<p class="dragon-speech">The fly is annoying!</p>
<p class="dragon-speech">Swat it!</p>
<p class="dragon-speech">Crush it!</p>
<p class="dragon-speech">Fly!!!</p>

Answer №1

Successfully resolved the issue by adjusting the animation delay to negative values. This can be achieved for each ":nth-of-type(n)" by utilizing the following code:

animation-delay: -9.8s;
animation-delay: -11.8s;
animation-delay: -13.8s;
animation-delay: -15.8s;
animation-delay: -17.8s;

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

Troubleshooting issue with CSS SVG Clip path functionality - facing technical difficulties

Having an issue with a clip path in my CSS. When I apply the clip path to my CSS fill, the image isn't showing up... I'm using Chrome. Any ideas on how to fix this? I found this helpful generator https://example.com .card .content .picture img { ...

Learn how to easily transition from the previous view controller to the next view controller in Swift for iOS development

In my application, I implemented a UITableView as a navigation menu with 5 cells: 'Home', 'Order Online', 'Gallery', 'Contact', and 'About'. When the user clicks the menu button, the UITableView Menu drops ...

Combining a Python backend with an HTML/CSS/JS user interface for desktop applications: the perfect synergy?

Is it possible to seamlessly combine Python code with HTML/CSS/JS to develop desktop applications? For instance, I want to create a function in Python that displays "Hello World!" and design a visually appealing user interface using HTML/CSS/JS. How can I ...

Creating inner borders on a pie chart with HTML and CSS: A step-by-step guide

After putting my coding skills to the test, I successfully crafted a stunning pie chart using only HTML and CSS. https://i.sstatic.net/5xCbl.png Here's the code snippet I tinkered with: HTML - <div class="pie-chart"></div> CS ...

Is there a copyright concern regarding CSS?

There are countless websites that spark my creativity. If I am inspired by a particular design, CSS, or JavaScript on one of these sites, am I allowed to copy it to my local folder and use it? For instance, let's say I come across a website called xy ...

Nested CollectionView within a TableView cell

When I included a CollectionView inside a TableViewCell, everything appeared to be working fine and showing all elements as expected. However, when I scrolled the TableView very quickly, the images in one collection would sometimes get replaced by images f ...

How to replicate a WordPress menu bar

Embarking on my coding journey, I've completed courses in HTML, PHP, CSS, JavaScript, and MySQL. Now, I've decided to dive into hands-on learning by creating a Wordpress child theme. My current challenge is figuring out how to overlay two differ ...

Guide to releasing vImage buffers once the operation is finished on IOS

When attempting histogram calculations with vImage buffers in the Accelerate framework, I encounter slow performance when displaying processed camera image data on the screen. Despite following Apple's documentation on freeing buffers after completing ...

Unable to get CSS First Child Pseudo Element to Work Properly

I'm having trouble with this code in CSS and would appreciate any help. I can't figure out why the margin-left won't apply to the first i element. Below is the CSS I'm using: header.site-header .right_side_menu i:first-child { marg ...

Alignment of card images

Is there a way to keep the images in my cards fixed at the top of the card body? I've tried using bottom: 0 but it's not working as expected. The card body has a fixed height and is fixed to the bottom, which is functioning correctly. However, si ...

Is there a way to make a div element clickable?

I have attempted to include a link (href) in the cart-button class using the following HTML code: <div class="cart-button" href="#shopping-cart" alt="view-shopping-cart"><span>Shopping Cart (0)</span> <div class="cart-dropdo ...

Apply a CSS class to the selected radio button when retrieving row data from the table

How can I dynamically add a CSS class to a snippet of code when a radio button is selected? Here's the jQuery Snippet: $(document).ready(function (){ $("input:radio").click(function () { if ($(this).is(":checked")) { var empid ...

I'm experiencing an issue where my view appears differently on an iPhone 5 compared to an iPhone 6, despite having constraints in place. Can anyone

I have a situation in my Swift application where I am adding a gradient to a view using the code snippet below: @IBOutlet weak var gradientView: UIView! override func viewDidLoad(){ super.viewDidLoad() let layer = CAGradientLayer() layer.fra ...

How to position a fixed element in relation to a wrapper div using HTML and CSS

I need assistance with positioning the floating box on the right side of the window on this particular page. My goal is to have this box relative to the white div containing all the text, so instead of it sticking to the window edge, it should float aroun ...

Ways to conceal a grid item in Material UI framework

My goal is to hide a specific grid item for a product and smoothly slide the others in its place. Currently, I am using the display:none property but it hides the item instantly. I have already filtered the products and now I want to animate the hiding of ...

An unusual character "" popped up while working with react native on iOS platform

Currently, I am in the process of learning how to use ReactNative for iOS. I have completed all the initial setup steps and am now following a tutorial for basic understanding. React Native However, I have encountered an error during this learning process ...

Responsive design with Semantic UI

Can you please provide an example of how to design for different screen sizes using Semantic UI instead of Bootstrap? I'm looking for something similar to Bootstrap's sm and lg classes. For instance, would it look like this: <div class="col s ...

Applying a left margin has caused the right border to disappear

After adding a margin-left to the box, I noticed that my right border is missing. You can see the issue in this example. However, when I remove the margin-left property, everything looks fine as shown in this example. Is there any way to solve this proble ...

Creating a thumbnail with a close button using an image

My code is available at the following link: https://codepen.io/manuchadha/pen/PBKYBJ In this form I have created, I am trying to implement an image upload feature using a file input. The goal is to display a thumbnail of the selected image below the file ...

Is your string being truncated when sending it from iOS to a web server using POST?

Recently, I encountered an issue while attempting to send a serialized object from my iOS app to a web server. Everything seemed to be working fine when sending a large string, but as soon as I tried sending the serialized object, the data would get cut of ...