Marquee of Stamps
This little trinket shows a sort of marquee of stamps on your site. I think this method works fairly well for my purposes. Maybe it will work for you too? Check out a live version on Code Pen.
There’s all kinds of controversy about whether you ought use the marquee tag on your website in any way, shape, or form. This is because it’s considered “deprecated” by web design professionals. Nevertheless, many people on neocities choose to use it for whatever reason. I’m okay with that, and throw no shade with regards to anyone’s web design choices.
That said, when I wanted a marquee feature on my own site, I decided to avoid use of the deprecated tag, instead opting for a CSS solution. It seems to work fairly well. My primary complaint? The marquee leaves a blank space just before it begins and ends. I cannot seem to be rid of it, though not for lack of trying, believe me. If anyone knows how to get rid of it, do make me aware. I’m eager to learn about these things.
This code assumes each stamp is 56 pixels tall and 99 pixels wide. This seems to be standard for these stamps, at least in terms of dimensions. It scrolls the stamps in an infinite loop across the space where you’ve placed the #marquee element, with that small gap mentioned before at the end. There is no gap between each stamp, but if you’d like one, this is easy to change in the CSS - just add a little padding to the images themselves.
The default settings for this little trinket dim the stamps to a lesser opacity than the elements around them. This prevents the marquee from distracting visitors. The marquee also moves very slowly, which makes it much more subtle. You can easily control the speed in the CSS. When visitors to your site move their cursor over the marquee, it pauses. The stamp the’ve moved their mouse over expands outwards and becomes fully opaque and bright, for a nice eye catch of sorts.
I added a slight dash of optional Javascript at the end, which should work for randomizing the stamps when they’re displayed. This is a fun little feature, and while it sometimes results in the same stamp shown twice in a row, that’s relatively rare if you’ve got quite a few stamps in the rotation. Give it a try if you have more than five or six stamps in rotation.
You can see the marquee on this site within the sidebar, either to the left or at the bottom of the page (on mobile). It features just a few stamps right now, but I’m collecting more every day. If you’d like to donate some, feel free to contact me via any of the information located just below the marquee.