A Movie-type page-transition ? CSS - javascript

I've been searching for a way to realize a page-blend, but I can only find help for specific animation properties..
What I would like is to have every page-change on my website to get a fade out and and a fade in, like you would between shots in video editing, just a very short and smooth transition. And, ideally it would fade all elements of page X to the background color and fade back into pageY as soon as every element on it is loaded.
Is this a big one? I haven't seen it anywhere but I always wonder if that would be possible - to get a smooth experience without having to see elements load and reposition quickly between page changes?

Related

Turn down the opacity of the whole website apart from one element onclick

I have inserted a modal popup into my website. This is going to hold a image map that will act as the nav bar.
When this modal pops up I am keen for the rest of the website to "fade out" by reducing the opacity. I have already played around with body{opactiy:0.2;} but unfortunately this also reduces the opacity of the modal/nav image.
The long way round would be to change the opacity of every single element on the webpage, apart from the model, on a onclick....this seems like a difficult way to solve the problem.
Does a neater solution exist?
Thank you for taking the time to read my query.
My suggestion would be to have a semi-transparent overlay over BODY, and have the model sit on top of this overlay.
But if you would like a quick fix: *:not(#modal){opacity: 0.2;}

controlling the time to load and play animated gifs

I have a slide with many animated gifs. Every slide contains an animated gif.
The effect I am trying to achieve is having the animated gifs play according to the timeline I created in photoshop and from the first frame to last when in view.
My issue is the animated gifs will start from the middle of the timeline instead of from the first frame when it is active and in view. I reckon it could be due to the loading time? I have tried increasing the time for the first frame and last frame of each slide but to no avail.
Is there a way to control the time to load and play the animated gifs when it is in view? is it something that needs to be done in javascript or jQuery?
From my point of view, CSS Sprites will give you better support that you wanted in your animation. Most important thing you need is to control over animation.
As you don't have any control over animated GIFs. You can't start them, you can't stop them, only thing they just do is to animate as soon as they load.
On the otherhand, with sprites, you can control the animation. Most importantly you can start, stop and react to browser events, pan through the animation.
As reference you can see Google Doodles which only activates when you only click on them.
For active reference, you can see the blog which might inspire you to use CSS Sprites.
https://itnext.io/creating-css-animations-using-sprite-sheet-47e2b7a3793c
Again, it's only opinion. Decisions is yours which one you will use for animation.

Animating elements that are repositioned from window resize

I am creating a web page that contains lots of transitions and animations. I don't like it when things zap from one place to another, I like it to slide over instead. Which is why I have a problem with responsive web apps. Yes, the elements of the page will reposition themselves correctly when you resize the window, but they don't animate, instead they go from point A to point B in, quite literally, no time.
Is there any way I can solve this problem? I am open to any CSS or JS solutions. For an example, go here, make your browser window smaller, and click on the hamburger menu icon in the top left. The buttons in the main section of the page reposition themselves but again, no animation. It makes me sad.

Code for Changing Background Image On Scroll Several Times to Create Animation

I was looking at this site and noticed how the background image seems to move and animate as the user scrolls. Upon inspection of the source code, it showed that this was achieved by changing the background image as the user scrolls. Essentially, it jumps through many frames of images giving the illusion of an animation.
What would be the quickest and easiest way to achieve this? I am using the ScrollMagic library if that would make it easier.
The quickest, easiest way is to listen for scroll events on the element, then change the background url via CSS to the file you want to show. You'll probably need to convert the pure scroll value to a percentage (to account for varying screen sizes), and you'll need an array of images that map to those percentages.

AngularJS ngAnimate ngView smooth fade out/in animation

i like to have a nice transition while i change the content of my ngView. The user can always change the active view faster than the animation. Is there a way to always get an smooth fade out/in animation. The only way that is visible to seems to ignore fadeout/leave.
Plunker Link
Try this http://plnkr.co/edit/NO0Xqh?p=preview.
With JavaScript controlled animation, it will make sure when user clicks faster than the animation, the value animation stop in the middle and reverse back to initial states.

Categories

Resources