Make a one page htlm file with a boat moving
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Little Boat</title>
<style>
:root { --sky1:#8ed8f4; --sky2:#fbd6a4; --sea:#167b9b; --deep:#075272; --foam:#d8f7f1; }
* { box-sizing:border-box; }
html,body { margin:0; width:100%; height:100%; overflow:hidden; font-family:system-ui,sans-serif; color:#fff; }
body { background:linear-gradient(var(--sky1),var(--sky2) 64%,var(--sea) 64%); transition:background .8s; }
body.night { --sky1:#182d54; --sky2:#513e68; --sea:#063b61; --deep:#032c4c; }
.scene { height:100%; position:relative; overflow:hidden; }
.sun { position:absolute; width:clamp(70px,12vw,130px); aspect-ratio:1; border-radius:50%; background:#fff4a8; box-shadow:0 0 55px #fff1a5; top:11%; right:14%; transition:.8s; }
.night .sun { background:#e7f0ff; box-shadow:0 0 35px #d9eaff; }
.night .sun:after { content:""; position:absolute; background:#182d54; width:100%; height:100%; border-radius:50%; left:-18%; top:-12%; }
.cloud { position:absolute; width:170px; height:35px; background:#ffffff99; border-radius:40px; top:20%; left:8%; filter:blur(1px); animation:drift 24s linear infinite; }
.cloud:before,.cloud:after { content:""; position:absolute; background:inherit; border-radius:50%; }
.cloud:before { width:70px;height:70px;left:28px;bottom:0; }
.cloud:after { width:55px;height:55px;left:88px;bottom:0; }
.cloud.two { top:35%; left:65%; transform:scale(.65); opacity:.55; animation-duration:34s; animation-direction:reverse; }
.horizon { position:absolute; top:63%; width:100%; height:10%; background:linear-gradient(180deg,#3e9a9b55,transparent); }
.sea { position:absolute; inset:68% 0 0; background:var(--sea); }
.wave { position:absolute; left:-10%; width:120%; height:22px; border-top:3px solid var(--foam); border-radius:50%; opacity:.7; animation:wave 5s linear infinite; }
.w1 { top:16%; } .w2 { top:43%; animation-duration:7s; animation-delay:-2s; opacity:.38; } .w3 { top:72%; animation-duration:9s; animation-delay:-5s; opacity:.5; }
.boat-wrap { position:absolute; z-index:3; width:clamp(170px,25vw,280px); left:-30%; top:48%; animation:sail 18s linear infinite; }
.boat { animation:bob 2.4s ease-in-out infinite; filter:drop-shadow(0 12px 5px #003b5555); }
.hull { height:55px; background:#a94f32; border-radius:8px 8px 48% 48%; border-bottom:10px solid #743625; transform:skewX(-8deg); }
.deck { position:absolute; width:78%; height:13px; left:11%; top:-5px; background:#e6a05b; border-radius:8px; }
.mast { position:absolute; height:145px; width:7px; background:#603d2a; left:48%; bottom:43px; }
.sail { position:absolute; left:51%; bottom:79px; width:0; height:0; border-left:72px solid transparent; border-bottom:105px solid #fff3cf; filter:drop-shadow(2px 2px 0 #c98d63); }
.flag { position:absolute; left:50%; bottom:181px; border-left:32px solid #ef6b52; border-top:10px solid transparent; border-bottom:10px solid transparent; }
.porthole { position:absolute; width:16px; height:16px; border-radius:50%; background:#8bd5df; border:3px solid #563126; bottom:20px; left:38%; }
.title { position:absolute; top:8%; left:7%; z-index:2; text-shadow:0 2px 10px #22506966; }
h1 { margin:0; font-size:clamp(2rem,6vw,5rem); letter-spacing:-.06em; }
p { margin:.4rem 0; font-size:clamp(.9rem,2vw,1.15rem); opacity:.9; }
button { position:absolute; z-index:5; bottom:6%; right:6%; border:0; border-radius:999px; padding:.75rem 1.2rem; background:#ffffffdd; color:#16445a; font-weight:700; cursor:pointer; box-shadow:0 4px 15px #003b5544; }
button:focus-visible { outline:4px solid #ffdc62; outline-offset:4px; }
.paused *, .paused *:before, .paused *:after { animation-play-state:paused !important; }
@keyframes sail { from { transform:translateX(0); } to { transform:translateX(145vw); } }
@keyframes bob { 0%,100% { transform:translateY(0) rotate(1deg); } 50% { transform:translateY(-12px) rotate(-2deg); } }
@keyframes wave { from { transform:translateX(-5%); } to { transform:translateX(5%); } }
@keyframes drift { from { margin-left:-15%; } to { margin-left:115%; } }
@media (max-width:600px) { .boat-wrap { top:52%; } .cloud { top:25%; } }
</style>
</head>
<body>
<main class="scene" aria-label="An animated boat crossing the sea">
<div class="sun" aria-hidden="true"></div>
<div class="cloud" aria-hidden="true"></div>
<div class="cloud two" aria-hidden="true"></div>
<div class="title"><h1>Ahoy!</h1><p>A little boat is on its way.</p></div>
<div class="horizon"></div>
<div class="sea" aria-hidden="true">
<div class="wave w1"></div><div class="wave w2"></div><div class="wave w3"></div>
</div>
<div class="boat-wrap" aria-hidden="true">
<div class="boat">
<div class="sail"></div><div class="mast"></div><div class="flag"></div>
<div class="deck"></div><div class="hull"></div><div class="porthole"></div>
</div>
</div>
<button id="pause" type="button" aria-pressed="false">Pause voyage</button>
</main>
<script>
const page = document.body, button = document.getElementById('pause');
button.addEventListener('click', () => {
const paused = page.classList.toggle('paused');
button.textContent = paused ? 'Resume voyage' : 'Pause voyage';
button.setAttribute('aria-pressed', paused);
});
setTimeout(() => page.classList.add('night'), 9000);
</script>
</body>
</html>
Nothing. This page is entirely self-contained and contacts no other website when it runs.
Published on Globefin under the MIT License. You may copy, change, and reuse this page, including commercially — just keep the notice below with it.
Copyright © 2026 Anderson Conlin. Licensed under the MIT License. Published on Globefin.
Provided as is, without warranty. Any external libraries it loads keep their own licences. Terms →
Scripts run, but the demo has its own throwaway origin. It can't read your session or cookies, can't reach the page around it, and can't navigate your tab. Don't enter real passwords or personal data into any demo.