GinaC123 Posted April 5, 2021 Posted April 5, 2021 Site URL: https://coyote-coconut-z39a.squarespace.com/about Right now, the scroll bar on my about page (site is here. Password to view is Hello2021) has blank space after the string of text, before it starts it's next rotation. How can I make it so the text is always visible and scrolling, with no blank space? The code I'm currently using is below. <div class="scroll">BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW</div> .scroll{ overflow: hidden!important; position: relative!important; -moz-transform:translateX(100%); -webkit-transform:translateX(100%); transform:translateX(100%); -moz-animation: scroll 15s linear infinite; -webkit-animation: scroll 15s linear infinite; animation: scroll 15s linear infinite;} @-moz-keyframes scroll { 0% { -moz-transform: translateX(100%); } 100% { -moz-transform: translateX(-100%); } } @-webkit-keyframes scroll { 0% { -webkit-transform: translateX(100%); } 100% { -webkit-transform: translateX(-100%); } } #page {overflow-x:hidden}
Beyondspace Posted April 9, 2021 Posted April 9, 2021 On 4/6/2021 at 4:33 AM, GinaC123 said: Site URL: https://coyote-coconut-z39a.squarespace.com/about Right now, the scroll bar on my about page (site is here. Password to view is Hello2021) has blank space after the string of text, before it starts it's next rotation. How can I make it so the text is always visible and scrolling, with no blank space? The code I'm currently using is below. <div class="scroll">BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW</div> .scroll{ overflow: hidden!important; position: relative!important; -moz-transform:translateX(100%); -webkit-transform:translateX(100%); transform:translateX(100%); -moz-animation: scroll 15s linear infinite; -webkit-animation: scroll 15s linear infinite; animation: scroll 15s linear infinite;} @-moz-keyframes scroll { 0% { -moz-transform: translateX(100%); } 100% { -moz-transform: translateX(-100%); } } @-webkit-keyframes scroll { 0% { -webkit-transform: translateX(100%); } 100% { -webkit-transform: translateX(-100%); } } #page {overflow-x:hidden} this may do the trick <style> .marquee { width: 100%; margin: 0 auto; overflow: hidden; white-space: nowrap; margin-left: -3vw; margin-top: 17px; } .marquee-content { display: inline-block; margin-top: 5px; animation: marquee 15s linear infinite; } .item-collection-1 { position: relative; left: 0%; animation: swap 15s linear infinite; } @keyframes swap { 0%, 50% { left: 0%; } 50.01%, 100% { left: 100%; } } .marquee-content:hover { animation-play-state: paused } .item1 { display: inline-block; height: 70px; width: 140px; background: cyan; vertical-align: top; margin-left: 15px; } .item2 { display: inline-block; height: 70px; width: 100px; background: magenta; vertical-align: top; margin-left: 15px; line-height: 14px; } /* Transition */ @keyframes marquee { 0% { transform: translateX(0) } 100% { transform: translateX(-100%) } } </style> <div class="marquee"> <div class="marquee-content"> <span class="item-collection-1">BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW </span> <span class="item-collection-2">BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW</span> </div> </div> BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
GinaC123 Posted April 10, 2021 Author Posted April 10, 2021 On 4/8/2021 at 10:09 PM, bangank36 said: this may do the trick <style> .marquee { width: 100%; margin: 0 auto; overflow: hidden; white-space: nowrap; margin-left: -3vw; margin-top: 17px; } .marquee-content { display: inline-block; margin-top: 5px; animation: marquee 15s linear infinite; } .item-collection-1 { position: relative; left: 0%; animation: swap 15s linear infinite; } @keyframes swap { 0%, 50% { left: 0%; } 50.01%, 100% { left: 100%; } } .marquee-content:hover { animation-play-state: paused } .item1 { display: inline-block; height: 70px; width: 140px; background: cyan; vertical-align: top; margin-left: 15px; } .item2 { display: inline-block; height: 70px; width: 100px; background: magenta; vertical-align: top; margin-left: 15px; line-height: 14px; } /* Transition */ @keyframes marquee { 0% { transform: translateX(0) } 100% { transform: translateX(-100%) } } </style> <div class="marquee"> <div class="marquee-content"> <span class="item-collection-1">BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW </span> <span class="item-collection-2">BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW • BOOK NOW</span> </div> </div> That did part of it, except you can see the text jump when it reaches the end of the scroll instead of continuously, smoothly looping. Is there a way to fix that?
Beyondspace Posted April 10, 2021 Posted April 10, 2021 28 minutes ago, GinaC123 said: That did part of it, except you can see the text jump when it reaches the end of the scroll instead of continuously, smoothly looping. Is there a way to fix that? Use javascript library https://github.com/aamirafridi/jQuery.Marquee BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Recommended Posts
Archived
This topic is now archived and is closed to further replies.