AngularJS CSS3 Animations for ng-repeat - css

My CSS is:
.fade-in-repeat {
-webkit-animation: fadein 2s; /* Safari and Chrome */
-moz-animation: fadein 2s; /* Firefox */
-ms-animation: fadein 2s; /* Internet Explorer */
-o-animation: fadein 2s; /* Opera */
animation: fadein 2s;
}
#keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Firefox */
#-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Safari and Chrome */
#-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
#-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​
/* Opera */
#-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​
My HTML is:
<tr class="fade-in-repeat" ng-repeat="transaction in transactions | orderBy:transaction.time">
<td>
<div class="row">
<div class="col-lg-6">
So as items are added, I want them to fade in. The problem is there is a FUOC before the animation kicks in, which makes it look like it's flickering

Just add opacity:0 to .fade-in-repeat's CSS
Demo

Related

How can i make my page title to be on top of everything in wordpress ? I am using elementor hello theme and elementor pro

h1.entry-title {
z-index: 9999;
color: #F23400;
font-family: 'Roboto', sans-serif;
font-size: 44px;
font-weight: 800;
font-style: italic;
text-align: center;
line-height: 15;
-webkit-animation: fadein 3s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 3s; /* Firefox < 16 */
-ms-animation: fadein 3s; /* Internet Explorer */
-o-animation: fadein 3s; /* Opera < 12.1 */
animation: fadein 3s;
}
#keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Firefox < 16 */ #-moz-keyframes fadein { from { opacity: 0; } to { opacity: 1; } } /* Safari, Chrome and Opera > 12.1 */
#-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
#-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Opera < 12.1 */
#-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
z-index: 9999;
}
This is what i have tried with no luck. I am sorry if this was answered before. I have set the background image to -1 that is on this page, and the title to 9999 with z-index. I am using elementor pro to do such editing on that image.

Stop CSS3 opacity animation before 1

I'm trying to animate a certain div opacity from 0 to 0.6, but it seems that at the end of the animation it jumps to 1.
What am I missing?
#test {
width: 200px;
height: 200px;
background-color: #900;
animation: fadein 2s;
-moz-animation: fadein 2s;
-webkit-animation: fadein 2s;
-o-animation: fadein 2s;
}
#keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 0.5;
}
}
#-moz-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 0.5;
}
}
#-webkit-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 0.5;
}
}
#-o-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 0.5;
}
}
<div id="test"></div>
You need to specify animation-fill-mode: forwards if you want the element's CSS to remain at the last step of the animation.
https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode
Forwards: The target will retain the computed values set by the last keyframe encountered during execution.
#test {
width: 200px;
height: 200px;
background-color: #900;
animation: fadein 2s forwards;
-moz-animation: fadein 2s forwards;
-webkit-animation: fadein 2s forwards;
-o-animation: fadein 2s forwards;
}
#keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 0.5;
}
}
#-moz-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 0.5;
}
}
#-webkit-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 0.5;
}
}
#-o-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 0.5;
}
}
<div id="test"></div>
Have you tried setting the opacity on the element you are animating to the final value?
I believe the rules in a CSS animation stop applying when the animation finishes. I would guess it is animating from 0 to 0.5 and then reverting to 1, 1 being the default opacity since you don't have an opacity specified on the element itself.
I hope this helps!

How do I DISPLAY div with CSS transition based on screen size?

My DIV with a class is hidden until the browser size is 1,000px width.
How do I make a the DIV fade in once the browser size makes it appear using CSS?
Here is my current code. It does not work.
Thank you for any help.
.instaWRAP {
display: none;
opacity:0;
transition:opacity 5s linear;*
}
#media only screen and (max-width: 1000px) {
.instaWRAP {display: inline}
}
Use this code in your media query:
-webkit-animation: fadein 2s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 2s; /* Firefox < 16 */
-ms-animation: fadein 2s; /* Internet Explorer */
-o-animation: fadein 2s; /* Opera < 12.1 */
animation: fadein 2s;
}
#keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Firefox < 16 */
#-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Safari, Chrome and Opera > 12.1 */
#-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
#-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Opera < 12.1 */
#-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}

CSS3 inifnite animation loop is not working in google chrome 31.0.1650.57

CSS3 Animation is not working. It's need to be working with css3 only.
HTML
<b>blink!</b>
CSS
#-webkit-keyframes datetime-blinker {
0% { visibility: hidden; }
100% { visibility: visible; }
}
#-moz-keyframes datetime-blinker {
0% { visibility: hidden; }
100% { visibility: visible; }
}
#-o-keyframes datetime-blinker {
0% { visibility: hidden; }
100% { visibility: visible; }
}
#keyframes datetime-blinker {
0% { visibility: hidden; }
100% { visibility: visible; }
}
b {
-webkit-animation: datetime-blinker 2s steps(2) 1s infinite; /* Safari 4+ */
-moz-animation: datetime-blinker 2s steps(2) 1s infinite; /* Fx 5+ */
-o-animation: datetime-blinker 2s steps(2) 1s infinite; /* Opera 12+ */
animation: datetime-blinker 2s steps(2) 1s infinite; /* IE 10+ */
}
http://jsfiddle.net/hYsG8/
Bug tracker:
https://code.google.com/p/chromium/issues/detail?id=324818&thanks=324818&ts=1386002678
Bug is fixed (Google Chrome 33.0.1734.2 canary)
Looks like you've found a bug. I guess Chrome isn't so good at animating boolean values.
You can use opacity as a workaround:
#keyframes datetime-blinker {
0% { opacity: 0.0; }
49% { opacity: 0.0; }
50% { opacity: 1.0; }
100% { opacity: 1.0; }
}
http://jsfiddle.net/hYsG8/1/

Only background image has to fade in on page load

I have a div with a background image (an arrow). In the div is some text, the arrow is below it. I want the text inside the div to load with the page, but the background image load a few seconds later.
This is my code:
.homearrow {
background: url(http://www.stefaanoyen.be/wp-content/uploads/2013/03/arrow.png) no-repeat 200px 155px;
background-size: 125px 125px;
float: left;
-webkit-animation: fadein 4s; /* Safari and Chrome */
-moz-animation: fadein 4s; /* Firefox */
-ms-animation: fadein 4s; /* Internet Explorer */
-o-animation: fadein 4s; /* Opera */
animation: fadein 4s;
}
#keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Firefox */
#-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Safari and Chrome */
#-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
#-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​
/* Opera */
#-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​
The problem: the whole div (text and background image) fades in. Is there a way to make the background image fade in, not the text?
Thank you,
Stefaan
Try the following
<html>
<head>
<style>
.wrapper {position: relative; margin: 15px 15px 15px 15px ;}
.homearrow {
background: #fff url('arrow.png') 0px 0px no-repeat ;
background-size: 125px 125px;
float: left;
-webkit-animation: fadein 4s; /* Safari and Chrome */
-moz-animation: fadein 4s; /* Firefox */
-ms-animation: fadein 4s; /* Internet Explorer */
-o-animation: fadein 4s; /* Opera */
animation: fadein 4s;
height: 125px;
width: 125px;
position: absolute; top: 0px; left: 0px;
}
.homearrowtext {position: absolute; top: 10px; left: 10px; }
#keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Firefox */
#-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Safari and Chrome */
#-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
#-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​
/* Opera */
#-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​
</style>
</head>
<body>
<div class="wrapper">
<div class="homearrow"></div>
<p class="homearrowtext">Hello World</p>
</div>
</body>
I have put the text outside the div, applied position relative to the containing div and position absolute to the text. I have also given the image div some width and height.
Hope this helps.

Resources