Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
September 05, 2026 - @989.81
Activity rating: Four Stars Posts & Arts: 72/1k.beats Random | Recent Posts | Guild Recents
News: Love is not possession  :4u: Guild Events: 10: window

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  CSS Marquees


« previous next »
Pages: [1] Print Embed
Author Topic: CSS Marquees  (Read 1365 times)
IndigoGolem
Sr. Member ⚓︎
****
View Profile WWW


What's personal text?
⛺︎ My Room
RSS: RSS

Guild Memberships:
Artifacts:
squeezed gentlyVisited on Melon's 10th Anniversary!I got robbed by Dan Q on Melonland!Joined 2025!
« on: September 27, 2025 @648.28 » Embed

...but you can also do smoother marquees using CSS - this is the code the forum uses:

Code
<span class="marquee"><span>My scrolling text</span></span>

<style>
.marquee span {
    width: max-content;
    display: inline-block;
    animation: marquee 25s linear infinite;
    padding-left: 100%;
}

.marquee span:hover {
  animation-play-state: paused
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}
</style>

I'm trying to do some stuff with marquees* and i'm confused about it. I like this code better than how Firefox handles <marquee>, but i don't understand why the animation breaks if i change the display from inline-block to inline. Though that stopped mattering when i realized i need to make it position:absolute to fully fill the background.

When i use this same code in my site the image in the marquee jumps back to where it started when the animation finishes, instead of looping smoothly. I changed a few things like the timing and making it play on hover instead of pause on hover, but nothing that should break this. Maybe it's so smooth here because of some other styling that applies to <span> or <p>.

Has anyone figured out a way to make the marquee loop seamlessly instead of having a space? Repeating the image inside the inner <span> delays the problem but doesn't actually fix it.

My testing page no longer anywhere (oops). The box in the middle is to stop the background from scrolling when you hover over the middle of the page.


* Actual 3D spaces in CSS are hard so i'm trying to fake it with marquees that scroll to show a full 360° view of a space. Probably with either an image map or a CSS imitation image map for links.

« Last Edit: March 28, 2026 @704.14 by IndigoGolem » Logged

-Indigo, Anve Ozo

Artifact Swap: Mick Jagger's mouthCreampuffNoidWildflowers!2 coins
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 MelonLand Editor Recent Edits Tenement Arcade Want to Login or Join ? Forum Art Hub Chat Webring Web Guides Graphics Catalogue Wiki Newsletters Image Stream
Melon's Sites TamaNotchi Textures PixelSea GifyPet MoMG Ozwomp Online Loom Videos Leaky Webring Melonking
Tools Melon Software ArtHub Embed Maker ML Passports
Outlinks Frutiger Aero Forum Onio Club m15o's Web Services 32Bit Cafe iMood Webrings Internet Phone Book HTML Energy Declarations Hackers & Designers
Zap!
Minecraft: Online
Join: craft.melonking.net