The following example lists a set of animations that can be applied to the page switching process to create an interesting navigation effect. Although some effects are very simple, just simple sliding movements, others use perspective and 3D Transforms to create some three-dimensional dynamic effects.
Download Now Online Demo
Warm reminder: To ensure the best results, please use IE10, Chrome, Browse in modern browsers such as Firefox and Safari.
CSS animations are divided into different groups based on the effects they implement. To show the page transition effect, we use the following structure:
1 |
|
The position of the perspective container is relative, and we increase the perspective by 1200 pixels. All animation effects require the following styles:
1 |
|
The above .pt-page-ontop style is used for some page transition effects, that is, we need to leave one page on another The top of a page. Here is a code example that shows animation classes and keyframe animation, scaling the web page in different directions and fading in and out:
1 |
|
For the purposes of this demonstration, we use The corresponding animation class is applied to the current page and the page that will be switched in, for example:
1 |
|
To view the demo, you can browse a complete set of pages by clicking the first button To toggle effects, you can also choose to preview a specific effect from the drop-down menu.
I hope you enjoy this and get inspired to create something even more exciting!
Download Now Online Demo