Coding Snips - Rice2k

Welcome to the Coding Snips section of Rice2k.com! Here’s where you’ll find a stash of retro-inspired code snippets to bring that Y2K web vibe to your site. From marquees to cursor trails, these bits of HTML, CSS, and JavaScript will make your page feel like a Geocities classic. Copy, paste, and customize to your heart’s content! ~ Rice2k

Retro Marquee Banner

Add a scrolling marquee to your site, perfect for shouting out your fave links or blasting that early-2000s energy!

<marquee behavior="scroll" direction="left" scrollamount="5">
    Welcome to my awesome site! Check out <a href="links.html">Links</a> and <a href="buttons.html">Buttons</a> for more! ~ Rice2k
</marquee>
Blinking Button

Create a button that blinks like it’s straight out of 1999. Use CSS to make it pop on hover!

<style>
    .blink-btn {
        background-color: #F05423;
        color: #D3D4D6;
        padding: 5px 10px;
        border: 1px solid #3F4C4F;
        text-decoration: none;
        animation: blink 1s infinite;
    }
    @keyframes blink {
        50% { opacity: 0.5; }
    }
    .blink-btn:hover {
        background-color: #D3D4D6;
        color: #F05423;
    }
</style>
<a href="about-me.html" class="blink-btn">About Me</a>
Retro Cursor Trail

Add a sparkly cursor trail to your page for that ultimate retro flair. Works best in old browsers!

<script>
    document.onmousemove = function(e) {
        var trail = document.createElement('div');
        trail.style.position = 'absolute';
        trail.style.width = '5px';
        trail.style.height = '5px';
        trail.style.backgroundColor = '#F05423';
        trail.style.left = e.pageX + 'px';
        trail.style.top = e.pageY + 'px';
        document.body.appendChild(trail);
        setTimeout(function() { trail.remove(); }, 500);
    };
</script>
Simple Guestbook Form

A bare-bones guestbook form to let visitors leave their mark, just like the old days. Needs a backend to process!

<form action="guestbook.php" method="post">
    <label style="color: #D3D4D6;">Name:</label><br>
    <input type="text" name="name" style="background-color: #3F4C4F; color: #D3D4D6; border: 1px solid #F05423;"><br>
    <label style="color: #D3D4D6;">Message:</label><br>
    <textarea name="message" style="background-color: #3F4C4F; color: #D3D4D6; border: 1px solid #F05423;"></textarea><br>
    <input type="submit" value="Sign Guestbook" style="background-color: #F05423; color: #D3D4D6; border: 1px solid #3F4C4F;">
</form>
Status Bar Message

Display a scrolling message in the browser’s status bar, a classic trick from the early web!

<script>
    var msg = "Welcome to Rice2k.com! Explore retro web vibes! ";
    var pos = 0;
    function scrollStatus() {
        window.status = msg.substring(pos, msg.length) + msg.substring(0, pos);
        pos = (pos + 1) % msg.length;
        setTimeout(scrollStatus, 200);
    }
    scrollStatus();
</script>

Feeling the retro coding vibe? Use these snippets to jazz up your site, and share your creations on the Contact page! Want more? Check out my Projects for bigger ideas. Keep the early web alive! ~ Rice2k