fade out a page not a text or image

joaopeixoto
63 Posts
joaopeixoto posted this 10 December 2022
Ask a Question

Hi.

Is it possible to fade out and fade in page transitions? Change a page from another using fade out/fade in
like in this template:

wix - fade out fade in

Thanks for your help.

Hi. Is it possible to fade out and fade in page transitions? Change a page from another using fade out/fade in like in this template: [wix - fade out fade in][1] Thanks for your help. [1]: https://www.wix.com/website-template/view/html/2055
Vote to pay developers attention to this features or issue.
10 Replies
Order By: Standard | Newest
joaopeixoto
63 Posts
joaopeixoto posted this 10 December 2022

I've put this in my css page:

<style>
    body {
        animation: fadeInAnimation ease 3s;
        animation-iteration-count: 1;
        animation-fill-mode: forwards;
    }
    @keyframes fadeInAnimation {
        0% {
            opacity: 0;
        }
        100% {
            opacity: 1;
        }
    }
</style>

It works to fade in pages, but the transition from 1 to another is not there.

I've put this in my css page: <style> body { animation: fadeInAnimation ease 3s; animation-iteration-count: 1; animation-fill-mode: forwards; } @keyframes fadeInAnimation { 0% { opacity: 0; } 100% { opacity: 1; } } </style> It works to fade in pages, but the transition from 1 to another is not there.
joaopeixoto
63 Posts
joaopeixoto posted this 10 December 2022

maybe this will work:

https://www.oodlestechnologies.com/blogs/Set-fade-in-and-fade-out-when-load-the-page-or-refresh-the-page-using-CSS-and-Javascript/

How can I try this code in nicepage?

maybe this will work: [https://www.oodlestechnologies.com/blogs/Set-fade-in-and-fade-out-when-load-the-page-or-refresh-the-page-using-CSS-and-Javascript/][1] How can I try this code in nicepage? [1]: https://www.oodlestechnologies.com/blogs/Set-fade-in-and-fade-out-when-load-the-page-or-refresh-the-page-using-CSS-and-Javascript/
Support Team
Support Team posted this 12 December 2022

Hi, João,

Sorry for the delay.

The CSS code can be added in Site Settings ==> CSS. Concerning the JavaScript code, you should first wrap it into the script HTML tag, and add it in Site Settings ==> HTML ==> Additional Head HTML. It is how it should look:

<script>
function setFadeIn(){
    document.body.className = 'body fade-in'
    setTimeout(setFadeOut, 500);
}

function setFadeOut(){
    document.body.className = 'body';
}
</script>

Let us know if you need our further help!
...................................................
Sincerely,
Paul C.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, João, Sorry for the delay. The CSS code can be added in *Site Settings ==> CSS*. Concerning the JavaScript code, you should first wrap it into the *script* HTML tag, and add it in *Site Settings ==> HTML ==> Additional Head HTML*. It is how it should look: <script> function setFadeIn(){ document.body.className = 'body fade-in' setTimeout(setFadeOut, 500); } function setFadeOut(){ document.body.className = 'body'; } </script> Let us know if you need our further help! ................................................... Sincerely, Paul C. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
joaopeixoto
63 Posts
joaopeixoto posted this 13 December 2022

How do I do last part?

Call the javaScript function with body tag using onload() event. For example .

How do I do last part? Call the javaScript function with body tag using onload() event. For example .

Last edited 13 December 2022 by joaopeixoto

Support Team
Support Team posted this 13 December 2022

Hi, João,

If you mean the JS code, simply wrap it into the script HTML tag and insert it in Site Settings ==> HTML. If you mean something else, let us know about that.
...................................................
Sincerely,
Paul C.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, João, If you mean the JS code, simply wrap it into the *script* HTML tag and insert it in *Site Settings ==> HTML*. If you mean something else, let us know about that. ................................................... Sincerely, Paul C. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
joaopeixoto
63 Posts
joaopeixoto posted this 13 December 2022

What I mean is how do I call the fuctions. body onload="setFadeIn()"

What I mean is how do I call the fuctions. body onload="setFadeIn()"
Support Team
Support Team posted this 13 December 2022

Hi, João,

You can contact the author of the code regarding this as we cannot know how exactly custom codes should work.
...................................................
Sincerely,
Paul C.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, João, You can contact the author of the code regarding this as we cannot know how exactly custom codes should work. ................................................... Sincerely, Paul C. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
joaopeixoto
63 Posts
joaopeixoto posted this 13 December 2022

What I want is to insert that onload="setFadeIn()" in the BODY TAG.
The advice you gave me is only to create the functions. but I need to call them to work.

What I want is to insert that onload="setFadeIn()" in the BODY TAG. The advice you gave me is only to create the functions. but I need to call them to work.
Support Team
Support Team posted this 13 December 2022

Hi João,

I assume that you can add some JS code that will insert this attribute into the body tag.
But please note that we do not support custom code modifications, so you can try to find the code that will help you. We also recommend to backup your project before inserting custom code.

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi João, I assume that you can add some JS code that will insert this attribute into the body tag. But please note that we do not support custom code modifications, so you can try to find the code that will help you. We also recommend to backup your project before inserting custom code. ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
joaopeixoto
63 Posts
joaopeixoto posted this 13 December 2022

ok thx.

ok thx.
You must log in or register to leave comments