Prevent flicker on webkit-transition of webkit-transform
The solution is mentioned here: iPhone WebKit CSS animations cause flicker.
For your element, you need to set
-webkit-backface-visibility: hidden;
BootStrap Carousel Slide Animation flicker
There could be many issues at play here. But to show you a fully working copy to reference against, here is a JSfiddle of the carousel
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
https://jsfiddle.net/fatchild/j310af6n/13/
Things I would check...
- I have included all the relevant libraries for bootstrap to work. (see the JSFiddle)
- Check that the system choppy-ness isn't down to a slow system. Move your code onto something like JSFiddle and compare to mine.
- Shake your computer whilst screaming.
Weird CSS3 Transition (flickering)
I got rid of the flickering. Add «-webkit-backface-visibility: hidden;
» to the elements you are transitioning. Voilà!
How to Prevent flicker problem in css animation?
That's because the images haven't loaded, and they only start loading when the animation starts. To prevent this flickering, you can use the onload event in Javascript:
<div class="slider"></div>
<style>
.slider{
background-image: url("1.jpg");
background-repeat: no-repeat;
background-size: cover;
height: 540px;
width: 960px;
}
.slider.loaded{
animation: slideshow 10s infinite;
}
@keyframes slideshow{
0%{
background-image: url("1.jpg");
}
25%{
background-image: url("2.jpg");
}
50%{
background-image: url("3.jpg");
}
75%{
background-image: url("4.jpg");
}
}
</style>
<script>
var images = [
"1.jpg",
"2.jpg",
"3.jpg",
"4.jpg"
];
function loadImg(i){
if(images[i] != undefined){
var img = new Image();
img.src = images[i];
img.onload = function(){ // detect if image has been loaded
i++;
loadImg(i);
}
}
if(images.length == i) // adding class 'loaded' when all images finished with loading
document.getElementsByClassName("slider")[0].classList.add("loaded");
}
loadImg(0);
</script>
NOTE:
I managed to prevent the flickering, butThis only works perfectly in Chrome
Firefox can't animate the images, but the images are still shown
This is absolutely not working in IE / Edge
CSS animation flickering, tried all tricks I could find
Try changing the animation start delay to 0 in the css:
.animationComplete {
animation-name: complete;
animation-delay: 0s;
animation-duration: 1.0s;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
}
Related Topics
CSS Ul Li Image to Align with Text
Loading Global SASS Files in Multiple Compass Projects
Bootstrap 3 Navbar-Right No Padding with Navbar-Fixed-Top
CSS3 /CSS - Spinning Background Image
Border-Radius on <Th>. No Border Rounding
Resize a Div Based on Height But Retain Aspect Ratio (Almost Got It) Strange Reload Bug
How to Revert Webkit-Appearance for Input[Type="Search"] of Normalize.CSS
CSS: Opacity Only Background, Not The Text Inside
How to Add CSS to Vaadin/Maven Project
React Js: Apply Material-Ui CSSbaseline
How to Style a Text Input to Fill The Width of It's Parent
CSS Background Gradient with Offset
Vscode - Change Highlight Color of Current File
Is The CSS3 Transform Translate Percentage Values Relative to Its Width And/Or Height