iOS image suddenly expands to full size after applying keyframe scale transformation

Encountering a peculiar iOS glitch while implementing CSS animations for moving shapes on a webpage. The issue arises when the shapes, initially displayed at full size, gradually shrink and fade out during animation. However, towards the end of the animation in Safari or Chrome on iOS, they momentarily revert to full opacity and their original image size. This unexpected behavior is akin to popcorn popping as multiple objects move across the page. To see the problem firsthand, visit: . Any insights into what might be causing this strange behavior?

#logo-one {
  opacity: 0;
  background: url("../img/animation-sprites.png") no-repeat;
  width: 52px;
  height: 58px;
  background-position: 0 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-animation: changeSize-one 3s 5s infinite linear both;
  -moz-animation: changeSize-one 3s 5s infinite linear both;
  -o-animation: changeSize-one 3s 5s infinite linear both;
  animation: changeSize-one 3s 5s infinite linear both;
  right: -52px;
  position: absolute;
}
@-webkit-keyframes changeSize-one {
  0% {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    -ms-transform: rotate(0deg) scale(1);
    -webkit-transform: rotate(0deg) scale(1);
    top: 120px;
    right: -52px;
  }
  50% {
    opacity: .5;
    transform: rotate(15deg) scale(0.77);
    -ms-transform: rotate(15deg) scale(0.77);
    -webkit-transform: rotate(15deg) scale(0.77);
    right: 200px;
    top: 60px;
  }
  100% {
    opacity: 0;
    transform: rotate(30deg) scale(0.29);
    -ms-transform: rotate(30deg) scale(0.29);
    -webkit-transform: rotate(30deg) scale(0.29);
    right: 430px;
    top: 0;
  }
}

Answer №1

Have you considered utilizing the transform: translate CSS property in place of top and right?

transform: rotate(*) scale(*) translate(50px,100px);

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

Why is the Request->file returning null?

I have a project where I am building a video store with movie images, titles, lengths, and delete options. However, every time I try to upload an image, it returns null. I am using Laravel 5.8.35. I attempted to use getClientOriginalExtension, but it does ...

Arranging list items on top of each other without using absolute positioning

Hey there! I am trying to figure out a way to stack list items containing images on top of each other, like a deck of cards, but without resorting to absolute positioning. I attempted to do it using absolute positioning, here's what I came up with: ...

How can I avoid duplicating code in HTML? I find myself utilizing the Bootstrap 4 collapse feature around 20 times on a single page

<div class="card" style> <div class="card-header" id="headingOne"> <h5 class="mb-0"> <button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" aria- expanded="true" aria-controls="collapseO ...

Employing the CSS not selector within JavaScript

I am facing an issue where my form darkens with the screen every time I click a button to show it, using JavaScript. If I were using CSS, I know I could use the :not selector, but I need guidance on how to achieve this in JS. Can anyone assist me? Below i ...

Background Image Will Not Expand

After searching for a solution on how to stretch the background image in HTML for this specific section of my website, I came across this code. However, despite implementing it, the desired effect is not being achieved. Can anyone spot what mistake I may ...

Problem with app-theme.html not being recognized within a custom element

While developing a web app with polymer, I encountered an issue with a custom element called side-bar. I have a separate file named app-theme.html where all the styles for the app are defined. However, when I moved the side-bar element into its own templat ...

Ways to retrieve the CSS class names associated with an element

To determine if an element has been selected, I rely on checking for the presence of an additional CSS class called "selected" that is added to the element The structure of my element is as follows: <div class="b-wide-option" data-bind="css: { selecte ...

Navigate to a specific section within a div

I am currently developing a web chat application in next.js and have added an emoji picker button. However, when the button is clicked, the emoji menu only appears after scrolling down. I attempted to use scrollIntoView() but it did not work as expected. ...

How can I make an image tag perfectly fit a CSS grid cell without using object-fit?

In this Vue component, the parent element displays 8 instances of these components in a 2x4 grid layout. The issue arises when the image within each component is larger than its container, causing it to not shrink to fit while maintaining the aspect ratio ...

Unable to prevent ordered lists from overlapping with other content I attempt to place beneath them in HTML

function filterImages() { let input = document.getElementById('searchbar').value; input = input.toLowerCase(); let images = document.getElementsByClassName('gallery'); for (let i = 0; i < images.length; i++) { ...

Problem encountered with the submission feature in Zend Framework

I am encountering an issue with the submit button icon not displaying. In my .php file, I have the following code: $submit = new Zend_Form_Element_Submit('submit'); $submit ->setLabel(Zend_Registry::get('Zend_Translate')->tra ...

Loading images with CSS media queries is an essential technique for optimizing

Currently, I am exploring options to dynamically load a background image based on the width of the browser window. This way, I can optimize bandwidth usage by only loading the image that will be displayed. I am aware that using the HTML picture tag allows ...

Wrapping content in flexbox and aligning it justified

I have an issue where I want to display a page title on the left side and a rating number with stars on the right side. My goal is to center all items once flexbox wraps. Specifically, when the "Longer Page Title" reaches the rating and stars and the flexb ...

Determine the height of the left div, which is set to auto, and apply the same height to the right div, which has overflow set

I am facing an issue that needs a solution. I need to ensure that two div elements have the same height. The left div should have 'auto' height while the right one must match it. Moreover, the right div contains 14 nested divs that need to be scr ...

Tips for arranging elements in a customized manner using Bootstrap

Is it possible to reorder columns between desktop and mobile in Bootstrap 5 like the example shown in this image? https://i.sstatic.net/I74PF.jpg I have explored using the order classes and experimented with position: absolute, but I haven't been ab ...

Adjust the header width and column alignment when freezing the header in a gridview interface

Looking to implement a gridview with a fixed header? I've tried various solutions including this link and this one. While I've managed to get it working, the main issue lies in the alignment of header width and column width. The scroll and freez ...

Move your cursor over an image to modify the z-index of another image

I am facing an issue with my webpage that consists of 6 small images and one large image in the center, made up of six layers each containing one image, similar to this example: http://jsbin.com/onujiq/1/. I have set the z-index property of all center imag ...

Set a div to have both absolute positioning and sticky behavior

Looking to create a div ("profilemenu") that pops out on the right side of the page triggered by a button (I'll handle this part). I want it to have a sticky attribute, but positioning has been tricky. Using position: absolute works for proper placeme ...

Utilizing Jquery Effectively to Dynamically Alter Images Based on Ids

HTML Section <div class="features-section"> <div class="container"> <div class="row"> <div class="feat-heading text-center"> <h3>Features</h3> ...

Import necessary styles into the shadow DOM

Embracing the concept of shadow dom styles encapsulation is exciting, but I wish to incorporate base styles into each shadow dom as well (reset, typography, etc). <head> <link rel="stylesheet" href="core.css"> ... </h ...