I just coded a website. To preview the website, I used npm start. This worked well and I was able to see animations on both chrome and safari. However after building the website using npm run build and then serve -s build, the website build doesn't show animations on chrome but does show animations on safari.
For reference, this is what my CSS style sheet looks like.
#-webkit-keyframes appear {
from {
opacity: 0%;
}
to {
opacity: 100%;
}
}
#keyframes appear {
from {
opacity: 0%;
}
to {
opacity: 100%;
}
}
#projectHead {
-webkit-animation-name: appear 4s;
animation-name: appear;
animation-duration: 4s;
}
All the properties are displayed but the animations. To give a visual estimate, appear should smoothly transition in 4s. This happens for the time before the build but while viewing the build, my animations on chrome look like a staggered discrete animation in which I get 0% opacity at 1s and 100% opacity at 4s and no transition in between.
Someone please help! I have been trying to debug since morning.
In sencha Extjs 6.5.3 and 7.0.2 Modern the painted event is not triggered for all components and containers, please find the below fiddle which increment when clicked from Android,windows and even on Mac Safari, but not incrementing on iOS WKWebView (custom) and safari.
Is there any way to manually fire the painted event based on DOM Events or any alternative to the painted event? It was working on below 13.4 (iOS).
Please find this Sencha Fiddle Sample
Not working in ios 13.5.1
Working fine in Desktop chrome and Android devices..
Add this style fix to app.scss. Thanks to Sencha Support.
.x-paint-monitor.cssanimation {
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
Now working fine.
This alone did not work for us.
Add this style fix to app.scss. Thanks to Sencha Support.
.x-paint-monitor.cssanimation {
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
Now working fine.
We had issues in all webkit browsers (Chrome, Edge, Brave, Android webview,...).
The fix: increase the animation duration from 0.0001ms to al least 0.001ms (we set it to 0.01ms).
.x-paint-monitor.cssanimation {
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-duration: 0.01ms;
animation-duration: 0.01ms;
}
This problem seems to be fixed in Safari 14 (iOS and Mac).
Your test Fiddle is green on my iPhone and Mac with version 14.
ok here's the problem, I'm using the stickyjs plugin that comes bundled with the premium wordpress theme. I decided to make a mobilephone image stick when it reaches the viewport top and all is working except that it gets unstuck while scrolling then moves back to its fixed position again and sometimes it flickers.
Here's the website --> http://majic.explaininja.com/
the problem occurs in chrome and safari but not in firefox
thanks!!
When it switches from relative to static, it's using a CSS transition to go from 0px to 80px (from the top). To fix the issue, remove the transition:
-webkit-transition: .5s;
-moz-transition: .5s;
transition: .5s;
...from #majic-process #mobile-phone.
Ok so I am applying a parallax/ken burns effect on an image but I am not convinced the method I am using to do this is that good. It works well on webkit browsers, but is not very smooth on firefox and does not work at all in IE
It's pretty simple I have a background image in a div and on window load I apply a class called pan that changes the background position.
Would anyone have any ideas for a way of achieving this effect that would be SMOOTH and pan nicely.
Here is the site http://dev.touch-akl.com/xmas/
#banner{
background-size: 100%;
background-attachment: fixed;
background-repeat:no-repeat;
background-position:0 0;
padding-top:35.15625%;
-o-transition-duration: 10s;
-ms-transition-duration: 10s;
-moz-transition-duration: 10s;
-webkit-transition-duration: 10s;
}
At one point I even had a small scale on the .pan class that looked great in chrome but was even worse on firefox
#banner.pan{
background-position:0 160%;
}
here is the free plugin for the ken burn effect you can download it
here is the demo
I'm developing an app for the iPad using HTML5/CSS3. I'm not using any framework and am just using whatever is natively supported on the device. I have created some css3 animations to emulate the typical iOS sliding left or sliding right when navigating between screens. Here's an example of the slide left animation which is taking advantage of the iPad's CSS3 hardware acceleration: (the ipad is running 4.2).
/*************************************************
Slide Left
*************************************************/
.screen.slideleft{
-webkit-animation-duration: 0.5s;
-webkit-animation-timing-function: ease-in-out;
}
.screen.slideleft.outgoing{
z-index: 50 !important;
-webkit-animation-name: slideleft-outgoing;
}
.screen.slideleft.incoming{
z-index: 100 !important;
-webkit-animation-name: slideleft-incoming;
}
#-webkit-keyframes slideleft-outgoing{
from { -webkit-transform: translate3d(0%,0,0); }
to { -webkit-transform: translate3d(-100%,0,0); }
}
#-webkit-keyframes slideleft-incoming{
from { -webkit-transform: translate3d(100%,0,0); }
to { -webkit-transform: translate3d(0%,0,0); }
}
I also have this CSS which I've attempted to use to fix the flicker:
.incoming,
.outgoing{
display: block !important;
-webkit-backface-visibility: hidden;
}
This works great until the iPad keyboard is used. After which point all the animations flicker severely.
I've been looking for examples of an iPad HTML5 app that uses the keyboard and doesn't have flickers afterwards, but haven't turned up much. The jqTouch demos exhibit the same behavior on the iPad (although I know they were designed for the iPhone).
I've turned up a few posts/questions of similar questions but have never found a good answer. I've been through http://css3animator.com/2010/12/fight-the-flicker-making-your-css3-animation-bomb-proof/ and the articles linked there but haven't had any success.
Any other suggestions?
Update 1/13 # 9am
I've added this css and it helped a lot:
.incoming *,
.outgoing *{
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0,0,0); /* This helps with the flicker a lot. */
}
The foreground elements don't seem to flicker anymore, but the backgrounds still do. Still looking for some help or helpful resources on Mobile Safari's memory handling tactics.
Update 1/16 # 11pm
Increasing the z-index as suggested by anonymous. Didn't seem to make a difference.
Update 1/17 # 8:30am
I've posted a demo of the problem here.
The transitions between screens work great...until you tap/click inside one of the form fields. After the keyboard slides up and returns, all the transitions flicker. Go to the URL inside the iOS simulator or on an actual iPad to see what I'm talking about.
This is an old question, but I thought I'd share my experience.
I've been having issues with outrageous flickering (on css3 animations) on the iPad (as well as the iPhone, but in that case only in portrait view). I was able to completely resolve all of the flickering issues by setting :
-webkit-perspective: 0;
On the elements being animated. I'm not sure why this works, but it does (tested on iOS 4.2+, both iPad (1 and 2) and iPhone 4).
Update: I've just become aware of an issue with Chrome when setting the value of that attribute to 1. It works just fine when it's 0, so I've updated the above appropriately.
Looking at your source, the translate3d(0,0,0) isn't applied until the transition starts?
Try
.screen{
-webkit-transform: translate3d(0,0,0);
}
or
.screen *, .screen{
-webkit-transform: translate3d(0,0,0);
}
The flicker is probably the hardware acceleration kicking in (it currently only works on 3d translated elements).
I had the same issue, but i was able to reduce the flicker to almost unnoticeable by applying the fix described here and here:
http://code.google.com/p/jqtouch/issues/detail?id=301
https://github.com/senchalabs/jQTouch/issues/issue/130
Basically set the z-index of the page you a are moving out to -1 and after the transistion back to 1
I know this is a dinosaur old question, but there is a solution for this issue and it is quite lightweight and very simple.
document.getElementById('clicked_input').addEventListener('focus', function(e){
e.stopPropagation();
},false);
When i was tackling this issue too, I thought I tried everything - eventually the only thing that helped, was to create a modal window (position: absolute) outside of the app's container div, and also set the app's container div to display:false; when the keyboard was coming up. While it worked it was ugly, I tested everything to see what caused the event and it seemed that when the 'focus event' bubbled up, every 3d transform gets messed up (in flickering and performance).
Preventing the event of bubbling solved this issue completely - quite mind boggling that such a hated bug had such a simple solution?
You're not going to like me saying this, but JavaScript may be the answer you're looking for. I fear that when you bring the keyboard up, the process of rendering the HTML loses priority. With a continually updating script, like a setInterval loop, the iPad will have no choice but to render as planned. Explicit code requires no hacks.
I agree with Ben, you should probably set transforms on the classes themselves as well:
/*************************************************
Slide Left
*************************************************/
.screen.slideleft{
-webkit-animation-duration: 0.5s;
-webkit-animation-timing-function: ease-in-out;
-webkit-transform: translate3d(0,0,0);
}
.screen.slideleft.outgoing{
z-index: 50 !important;
-webkit-animation-name: slideleft-outgoing;
-webkit-transform: translate3d(-100%,0,0);
}
.screen.slideleft.incoming{
z-index: 100 !important;
-webkit-animation-name: slideleft-incoming;
-webkit-transform: translate3d(0,0,0);
}
#-webkit-keyframes slideleft-outgoing{
from { -webkit-transform: translate3d(0,0,0); }
to { -webkit-transform: translate3d(-100%,0,0); }
}
#-webkit-keyframes slideleft-incoming{
from { -webkit-transform: translate3d(100%,0,0); }
to { -webkit-transform: translate3d(0,0,0); }
}
If that doesn't work, I'd be curious to test if only translating the X with translateX(-100%) fixes the problem. (Not necessarily a fix, because you don't have hardware acceleration without 3D transforms, but would help narrow down the problem.)
Ultimately, there really wasn't a fix for this issue. It seems like form elements in WebKit on the iPad cause problems with flickering.
My workaround was that on the onblur of each form element, I refreshed the page using hash tags to ensure it refreshed to the exact same state. It still caused a "flicker" while it was refreshing, but it did keep the screen from flickering throughout the rest of the app.
I've recently been having the same problem and tried all sorts of complicated fixes. In the end I found the issue was down to the default styling on the input. I fixed my problem by adding the css input{outline:none}. It's prob just on the focus state so input:focus{outline:none;} should work.