moreoutlandish Posted January 16 Posted January 16 Looking for help troubleshooting this "Fade In" code I used on a client's website (CSS copied below). It's doing what it's supposed to on the homepage (see here), but I found it also makes the accordion headers fade in and out. Does anyone know how to exclude accordions from custom CSS? Thank you for any help! /*FadeIn*/ .fadeIn span{ animation: fadeEffect 10.5s linear infinite 0s; -ms-animation: fadeEffect 10.5s linear infinite 0s; -webkit-animation: fadeEffect 10.5s linear infinite 0s; color: #ffffff; opacity: 0; overflow: hidden; position: absolute; } .fadeIn span:nth-child(2){ color: #ffffff; animation-delay: 2.5s; -ms-animation-delay: 2.5s; -webkit-animation-delay: 2.5s; } .fadeIn span:nth-child(3){ color: #ffffff; animation-delay: 5s; -ms-animation-delay: 5s; -webkit-animation-delay: 5s; } .fadeIn span:nth-child(4){ color: #ffffff; animation-delay: 7.5s; -ms-animation-delay: 7.5s; -webkit-animation-delay: 7.5s; } /*FadeIn Animation*/ @-moz-keyframes fadeEffect{ 0% { opacity: 0; } 5% { opacity: 0; -moz-transform: translateY(0px); } 10% { opacity: 1; -moz-transform: translateY(0px); } 25% { opacity: 1; -moz-transform: translateY(0px); } 30% { opacity: 0; -moz-transform: translateY(0px); } 80% { opacity: 0; } 100% { opacity: 0; } } @-webkit-keyframes fadeEffect{ 0% { opacity: 0; } 5% { opacity: 0; -webkit-transform: translateY(0px); } 10% { opacity: 1; -webkit-transform: translateY(0px); } 25% { opacity: 1; -webkit-transform: translateY(0px); } 30% { opacity: 0; -webkit-transform: translateY(0px); } 80% { opacity: 0; } 100% { opacity: 0; } } @-ms-keyframes fadeEffect{ 0% { opacity: 0; } 5% { opacity: 0; -ms-transform: translateY(0px); } 10% { opacity: 1; -ms-transform: translateY(0px); } 25% { opacity: 1; -ms-transform: translateY(0px); } 30% { opacity: 0; -ms-transform: translateY(0px); } 80% { opacity: 0; } 100% { opacity: 0; } }
tuanphan Posted January 17 Posted January 17 Because Accordion Title uses <span> tag Can you share link to page where you use accordion? We can adjust the code easier 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!)
moreoutlandish Posted January 30 Author Posted January 30 (edited) Hey Tuan, Thank you for the reply! Here's what the accordion looks like now. Edited January 30 by moreoutlandish
Solution tuanphan Posted February 1 Solution Posted February 1 Add this CSS code span.accordion-item__title { animation: unset !important; -ms-animation: unset !important; -webkit-animtaion: unset !important; position: static !important; opacity: 1 !important; color: initial !important; } 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!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment