Jump to content

Recommended Posts

I'm testing out some code for a marquee banner. I like the look of the banner and the animation, however, it's not a continuous loop. See attached image. What I would like for it to do it just be continuous with no breaks. What have I missed?

Here's my code:

code block:

<div class="marquee">
<div class="track">
<h3> NOW BOOKING&nbsp; &nbsp; &nbsp; 
  &nbsp;·&nbsp; &nbsp; &nbsp; &nbsp;
  NOW BOOKING&nbsp; &nbsp; &nbsp; &nbsp;·&nbsp; &nbsp; &nbsp; 
  NOW BOOKING&nbsp; &nbsp; &nbsp; ·&nbsp; &nbsp; &nbsp; &nbsp;
  NOW BOOKING&nbsp; &nbsp; &nbsp; &nbsp;·&nbsp; &nbsp; &nbsp; &nbsp;
  NOW BOOKING&nbsp; &nbsp; &nbsp; &nbsp;·&nbsp; &nbsp; &nbsp; &nbsp;
  NOW BOOKING&nbsp; &nbsp; &nbsp; &nbsp;·&nbsp;NOW BOOKING&nbsp; &nbsp; &nbsp; 
  &nbsp;·&nbsp; &nbsp; &nbsp; &nbsp;
  NOW BOOKING&nbsp; &nbsp; &nbsp; &nbsp;·</h3>
</div>
</div>

css block

.marquee {
  position: absolute;
  display: flex;
  animation: moveLeft 40s linear infinite;
}
.track {
     font-size: 36px;
     min-width: 100%;
    text-align: center;
    padding:20px;
    line-height: .9em;
    color: #191c19;
    font-family: 'casanova';
    border-width:1px;
    background-color: #b1c2f6;
    border-style:solid;
    border-radius:inherit;
    white-space: nowrap;
  min-width: 100%;
  text-align: center;
}
section[id="621b04d4ad51f07b6c2a5f3e"] {
 overflow-x: hidden !important;
 overflow-y:hidden;
 min-height:initial !important;.Index-page-content {
  padding-top:30px;
  padding-bottom:30px;
}
}@keyframes moveLeft {
  from { transform: translateX(0%) }  to { transform: translateX(-100%) }
}

Screen Shot 2022-02-27 at 1.31.51 AM.png

Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

18 hours ago, jessmall said:

I'm testing out some code for a marquee banner. I like the look of the banner and the animation, however, it's not a continuous loop. See attached image. What I would like for it to do it just be continuous with no breaks. What have I missed?

Here's my code:

code block:

<div class="marquee">
<div class="track">
<h3> NOW BOOKING&nbsp; &nbsp; &nbsp; 
  &nbsp;·&nbsp; &nbsp; &nbsp; &nbsp;
  NOW BOOKING&nbsp; &nbsp; &nbsp; &nbsp;·&nbsp; &nbsp; &nbsp; 
  NOW BOOKING&nbsp; &nbsp; &nbsp; ·&nbsp; &nbsp; &nbsp; &nbsp;
  NOW BOOKING&nbsp; &nbsp; &nbsp; &nbsp;·&nbsp; &nbsp; &nbsp; &nbsp;
  NOW BOOKING&nbsp; &nbsp; &nbsp; &nbsp;·&nbsp; &nbsp; &nbsp; &nbsp;
  NOW BOOKING&nbsp; &nbsp; &nbsp; &nbsp;·&nbsp;NOW BOOKING&nbsp; &nbsp; &nbsp; 
  &nbsp;·&nbsp; &nbsp; &nbsp; &nbsp;
  NOW BOOKING&nbsp; &nbsp; &nbsp; &nbsp;·</h3>
</div>
</div>

css block

.marquee {
  position: absolute;
  display: flex;
  animation: moveLeft 40s linear infinite;
}
.track {
     font-size: 36px;
     min-width: 100%;
    text-align: center;
    padding:20px;
    line-height: .9em;
    color: #191c19;
    font-family: 'casanova';
    border-width:1px;
    background-color: #b1c2f6;
    border-style:solid;
    border-radius:inherit;
    white-space: nowrap;
  min-width: 100%;
  text-align: center;
}
section[id="621b04d4ad51f07b6c2a5f3e"] {
 overflow-x: hidden !important;
 overflow-y:hidden;
 min-height:initial !important;.Index-page-content {
  padding-top:30px;
  padding-bottom:30px;
}
}@keyframes moveLeft {
  from { transform: translateX(0%) }  to { transform: translateX(-100%) }
}

Screen Shot 2022-02-27 at 1.31.51 AM.png

You can get reference from:

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 3/1/2022 at 1:02 AM, jessmall said:

Hey thanks, I tried this code,  and it works - but isn't a continuous loop. I'm looking for it to have zero breaks or pauses. 

Try this guide https://ryandejaegher.com/easy-scrolling-text-in-squarespace/

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

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.