T_S Posted January 14 Share Posted January 14 Hello I've added a typewriter effect on my homepage. The animation seems to be working well but the transition between sentences is a bit slow. Is there a way to reduce the amount of time a sentence remains on the screen before getting deleted & the next one getting typed? For example, at the moment, after 'More Sales.' is typed out, the sentence remains on screen for about 5 seconds before it gets deleted and the next sentence is typed out. How do I reduce this to 1.5 or 2 seconds? This is the code I've used: //Home page text animation// @keyframes text1 {0%,25%,50%,75%,100% { width: 0;} 1%,24% {width: 5.5em;} } @keyframes text2 {0%,25%,50%,75%,100% {width: 0;} 26%, 49% {width: 8em;} } @keyframes text3 {0%,25%,50%,75%,100% {width: 0;} 51%,74% {width: 5.5em;} } @keyframes text4 {0%,25%,50%,75%,100% {width: 0;} 76%,99% {width: 6em;} } .text_1 {animation: text1;} .text_2 {animation: text2;} .text_3 {animation: text3;} .text_4 {animation: text4;} .text_1, .text_2, .text_3, .text_4 { overflow: hidden; white-space: nowrap; display: inline-block; position: relative; animation-duration: 20s; animation-timing-function: steps(10, end); animation-iteration-count: infinite; } .text_1::after, .text_2::after, .text_3::after, .text_4::after { content: "|"; position: absolute; right: 0; animation: caret infinite; animation-duration: 1s; animation-timing-function: steps(1, end); } Thank you! Link to comment
tuanphan Posted January 18 Share Posted January 18 You can play around with these lines in your code animation-duration: 20s; animation-timing-function: steps(10, end); Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
T_S Posted January 20 Author Share Posted January 20 Thank you. I've tried that but all that does is alter how long it takes to type out the phrases, it doesn't alter the interval between two phrases appearing on the screen. Any other ideas? On 1/18/2023 at 12:45 PM, tuanphan said: You can play around with these lines in your code animation-duration: 20s; animation-timing-function: steps(10, end); Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment