Jump to content

Have Image fade in and fade out

Recommended Posts

Posted

Hi still trying to figure out!
Right now the banner image just fades in but I want each photo to fade in THEN fade out, example, 

[1] Fade in, then fade out after 3 seconds, [2] fade in and then fade out after 3 seconds, etc the current code I am using is  

https://okra-vanilla-n2tn.squarespace.com/ the password is 123

/// Speech bubble fade in HOME PAGE

#block-yui_3_17_2_1_1698099613340_5182 {

animation: fade-me-in .5s;

}

@keyframes fade-me-in {

  0% {opacity:0;}

  80% {opacity:0;}

  100% {opacity:1;}

}

#block-8222289d31284ba440d5 {

animation: fade-me-in 1.0s;

}

@keyframes fade-me-in {

  0% {opacity:0;}

  80% {opacity:0;}

  100% {opacity:1;}

}

#block-7b78518b2a6909733fe1 {

animation: fade-me-in 1.5s;

}

@keyframes fade-me-in {

  0% {opacity:0;}

  80% {opacity:0;}

  100% {opacity:1;}

}

#block-80d9bee9e28b6781a90a {

animation: fade-me-in 2.0s;

}

@keyframes fade-me-in {

  0% {opacity:0;}

  80% {opacity:0;}

  100% {opacity:1;}

}

 

thank you!

ScreenShot2023-10-25at6_26_54PM.thumb.png.0d5590e241f625d09d0459e03fdd5e5e.png

  • Replies 2
  • Views 2.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

Add this code to Website > Website Tools > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  $(document).ready(function(){
    $("div#block-yui_3_17_2_1_1698099613340_5182").show().delay(3000).fadeOut();
});
</script>

(Just a test code for (1) image, to see if I understand your request correctly?)

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted
On 11/4/2023 at 2:42 AM, tuanphan said:

Add this code to Website > Website Tools > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  $(document).ready(function(){
    $("div#block-yui_3_17_2_1_1698099613340_5182").show().delay(3000).fadeOut();
});
</script>

(Just a test code for (1) image, to see if I understand your request correctly?)

thank you! will take a look

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.