I have a code, which looks like this:
<div ng-repeat="row in rows" class="my">
<img ng-src="{{row.pictureUrl}}">
{{row.text}}
</div>
The current implementation looks like this (it is CSS in Stylus format), supposed to look like slide down effect:
$slowAnimationDuration = 100ms
.my
&.ng-animate
transition:all
animation-iteration-count 1
animation-duration $slowAnimationDuration
&.ng-enter
animation-name fadeInQuick
animation-timing-function ease-out
&.ng-leave
animation-name fadeOutQuick
animation-timing-function ease-in
@keyframes fadeInQuick
0%
height 0
opacity 0
20%
height calc(0.5em + 1vh + 1px)
50%
opacity 0.05
100%
height calc(1em + 2vh + 2px)
opacity 1
@keyframes fadeOutQuick
0%
height calc(1em + 2vh + 2px)
opacity 1
100%
height 0
opacity 0
This code works, but quality of animation so far so good.
The issue is related to the absence of animation to height: auto
in CSS.
I'm using AngularJS 1.5 and have ngAnimate injected.
I can fix the height of the image, but I cannot change or cut the text.
How to make rows animation nicer? Is it even possible?
Update: tried this answer, looks really ugly, for some time page remains empty and after content appears. Also, this squeezing effect doesn't look appealing.