Safari and mobile browsers do not support animation functionality

My animation works flawlessly in Chrome, but it's not functioning properly on Safari. Quite odd, right? Here is the code snippet:

<header>
  <div class="ripple-1"></div>
  <div class="ripple-2"></div>
  <div class="ripple-3"></div>
  <div class="ripple-4"></div>
  <div class="ripple-5"></div>
</header>

Unfortunately, this animation does not display correctly on Safari and mobile devices as there is no movement at all. Moreover, specifically on Safari, it turns into a square border shape. What could be the reason for this issue?

Below is the CSS code I have implemented:

header{
  min-height: 100vh;
  background-color: #42A5F5;
  position: relative;
  overflow: hidden;
}

.ripple-1,
.ripple-2,
.ripple-3,
.ripple-4,
.ripple-5{
   height: 1px;
    width: 1px;
    position: absolute;
    left: 50%;
    bottom: 50%;
    background: dodgerblue;
    border-radius: 50%;
    transform: translate3d(-50%, 50%, 0);
    animation-name: ripple;
    animation-duration: 8s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-out;
    will-change: transform, opacity;
}

.ripple-1{
  animation-delay: 0;
}

.ripple-2{
  animation-delay: 1s;
}

.ripple-3{
  animation-delay: 2s;
}

.ripple-4{
  animation-delay: 3s;
}

.ripple-4{
  animation-delay: 4s;
}

.ripple-5{
  animation-delay: 5s;
}

main{
  height: 4000px;
  background-color: #f7f7f7;
}

@keyframes ripple{
  0%{
    transform: translate3d(-50%, 50%, 0) scale(0);
    opacity: .33;
  }
  100%{
    transform: translate3d(-50%, 50%, 0) scale(2000);
    opacity: 0;
  }
}

I tried using -webkit-, but unfortunately, it didn't resolve the issue :(

Answer №1

To ensure cross-browser compatibility, you can implement the following CSS code snippet:

header{
  min-height: 100vh;
  background-color: #42A5F5;
  position: relative;
  overflow: hidden;
}

.ripple-1,
.ripple-2,
.ripple-3,
.ripple-4,
.ripple-5{
   height: 1px;
    width: 1px;
    position: absolute;
    left: 50%;
    top: 50%;
    background: dodgerblue;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation-name: ripple;
    animation-duration: 8s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-out;
    will-change: transform, opacity, width;
    r
}

.ripple-1{
  animation-delay: 0;
}

.ripple-2{
  animation-delay: 1s;
}

.ripple-3{
  animation-delay: 2s;
}

.ripple-4{
  animation-delay: 3s;
}

.ripple-4{
  animation-delay: 4s;
}

.ripple-5{
  animation-delay: 5s;
}

main{
  height: 4000px;
  background-color: #f7f7f7;
}

@keyframes ripple{
  0%{
    opacity: .33;
  }
  100%{
    opacity: 0;
     height: 2000px;
    width: 2000px;
  }
}

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

Select either one checkbox out of two available options

My form includes two checkboxes, allowing users to click on both of them. I'm wondering if it's possible to set it up so that only one checkbox can be selected at a time. For example, clicking on the first checkbox would turn it on while turning ...

Tips for visually conveying the values of x and y using SVG symbols

I recently came across a blog post discussing the use of SVG symbols for icons, which inspired me to create representations of symbols using svg files. The original svgs I used had properties like x, y, height and width. However, when I tried adding these ...

Transform your ordinary HTML select into a stylish span with this custom CSS class

I need help making a select element appear like a span under certain conditions. The CSS class I currently have works with input boxes, but not with dropdowns. Is there any advice on how to style the select element to look like a span without actually repl ...

Adjust the CSS of a nested div within the currently selected div upon page load

I am facing an issue with a page that users access by clicking through an ebook. Upon clicking a link, they are directed to a specific product on the page, and the URLs look like example.com/#product1 example.com/#product6 example.com/#product15, etc... ...

Place a Three.js scene within a jQuery modal dialogue box

I am attempting to integrate a Three.js scene into a jQuery modal window. The objective is to utilize the Three.js scene in a larger window size. This scene should be displayed after clicking on an image that represents the scene in a smaller dimension. Y ...

How to modify the color of a div element with jQuery?

I need some help changing the color of a div with 'jQuery', but I am not sure how to do it. Below is the code I have been trying: function updateDivColor() { $('#OutlineX1').css("color","blue"); } ...

Tailored alignment of checkboxes and labels

I've designed a custom checkbox where the actual checkbox is hidden and a label is styled to look like a checkbox. Everything works fine, however, when I add a label, it doesn't align properly. Here's the link to the fiddle: http://jsfiddle ...

Implementing a customized mobile style sheet for Google Maps v3

Currently, I am attempting to enforce the Mobile stylesheet for Google Maps v3 JavaScript within a jQueryMobile application. Within the screen stylesheet, the zoom control consistently stays in the top left corner and my efforts to relocate it have proven ...

Personalize the file button for uploading images

I have a button to upload image files and I want to customize it to allow for uploading more than one image file. What is the logic to achieve this? <input type="file" />, which renders a choose button with text that says `no files chosen` in the sa ...

What is the process for adjusting the color of a particular date in the <input type=Date> field?

Is there a way to modify the styling, such as color, of the input type date in HTML 5? In HTML 5, we can display a calendar using <input type=date>. For example, if March 23rd is a holiday and I want to highlight this specific date in red, how can I ...

Encountering an issue with npm installation following a recent node version upgrade

Having trouble installing Sass on Node version v16.14.0. I keep receiving this error message: https://i.stack.imgur.com/6KNcF.png ...

The menu isn't displaying properly and the onclick function seems to be malfunctioning

My onclick event is acting strange. Whenever I click the mobile menu in the menubar, it just appears briefly like a flash and then disappears. It's not staying stable on the screen. The classes are being added and removed abruptly when I try to click ...

Embedding images within written content

Is there a way to insert an image into text from a specific position without using tables? I'm looking for a method other than aligning the image "left or right". ...

Scroll positioning determines the height of an entity

Here's a code snippet I'm working with: HTML: <div id="wrap"> <div id="column"></div> </div> CSS: #wrap { display: block; height: 2000px; width: 400px } #column { display: block; height: 20px; ...

Restrict the character count in the input field according to its width

Is there a way to restrict the number of characters in an input field based on its width? I have a dynamic input field with varying widths and I would like users to be able to type without their text extending outside of the input boundary. Using maxLeng ...

Display 1 row of content on larger LG screens and 2 rows on medium-sized MD screens using Bootstrap

How can I achieve 1 row with 12 cells on a large screen in Bootstrap, and for a smaller screen have 2 rows with 6 cells? Here is a visual representation of what I am trying to accomplish: https://i.stack.imgur.com/NgfaP.png This is the code I attempted: ...

What is the process for marking a form field as invalid?

Is it possible to validate the length of a field after removing its mask using text-mask from here? The problem is that the property "minLength" doesn't work with the mask. How can I mark this form field as invalid if it fails my custom validation met ...

Numerous objects come into view as you scroll

I found a code snippet online that animates items as they appear on scroll. However, the code only triggers animation for one item at a time. How can I modify the code to trigger the animation for all items? const observer = new IntersectionObserver(e ...

What is the best way to choose all text within a code box without highlighting the entire webpage?

I developed a CSS code specifically for my blogspot site to organize and store all of my code and technical snippets. .code { background:#dae6ef; background-repeat:no-repeat; border: solid #5C7B90; border-width: 1px 1px 1px 20px; color ...

Position the Bootstrap Button on the right side of the navbar

Hey there, I'm completely new to the world of HTML/CSS and this is my first project ever. I welcome any constructive criticism that can help me improve in the future. Now onto my current dilemma: I've decided to use Bootstrap because it seems u ...