← Demos
Web Pages · Hello World

Hello World Basketball

by Apollo Williamson Sep 1, 2026 3 views 5.8 KB
Sandbox · hello-world-basketball · no access to your account
View source — the whole page is this one file
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Hello World Basketball</title>
  <style>
    * { box-sizing: border-box; }
    html, body { height: 100%; margin: 0; overflow: hidden; }
    body {
      display: grid;
      place-items: center;
      background: linear-gradient(#83cdf4 0 67%, #d49a56 67% 100%);
      font-family: Arial, Helvetica, sans-serif;
    }
    .scene { position: relative; width: min(1100px, 100vw); height: min(700px, 100vh); overflow: hidden; }
    .sun { position: absolute; width: 120px; height: 120px; top: 45px; left: 8%; border-radius: 50%; background: #ffe16a; box-shadow: 0 0 55px #fff0a0; }
    .cloud, .cloud::before, .cloud::after { position: absolute; background: rgba(255,255,255,.85); border-radius: 999px; }
    .cloud { width: 150px; height: 45px; top: 85px; left: 40%; }
    .cloud::before { content:""; width: 75px; height: 75px; left: 18px; bottom: 4px; }
    .cloud::after { content:""; width: 62px; height: 62px; right: 15px; bottom: 5px; }
    .court { position:absolute; inset:67% 0 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 2px, transparent 2px 130px); border-top: 5px solid rgba(255,255,255,.65); }
    .court::after { content:""; position:absolute; width:400px; height:170px; border:6px solid rgba(255,255,255,.65); border-radius:50%; left:55%; top:58%; transform:translate(-50%,-50%); }
    .goal { position:absolute; right:6%; top:24%; width:260px; height:440px; z-index:3; }
    .pole { position:absolute; width:22px; height:330px; background:#303b4b; right:35px; top:110px; border-radius:8px 8px 0 0; }
    .base { position:absolute; width:130px; height:28px; right:-18px; bottom:0; background:#222b37; border-radius:50%; }
    .board { position:absolute; width:205px; height:135px; right:36px; top:0; background:rgba(245,252,255,.72); border:8px solid #eef7fb; box-shadow:0 6px 15px rgba(0,0,0,.18); }
    .board::after { content:""; position:absolute; width:72px; height:54px; border:5px solid #ef5252; left:65px; bottom:14px; }
    .rim { position:absolute; width:102px; height:22px; border:9px solid #e84921; border-radius:50%; left:21px; top:126px; z-index:4; }
    .net { position:absolute; width:76px; height:82px; left:34px; top:143px; clip-path:polygon(0 0,100% 0,73% 100%,27% 100%); background:repeating-linear-gradient(68deg,transparent 0 10px,rgba(255,255,255,.95) 11px 13px),repeating-linear-gradient(-68deg,transparent 0 10px,rgba(255,255,255,.95) 11px 13px); transform-origin:top; animation:swish 5.2s infinite ease-in-out; }
    .ball-wrap {
      position:absolute; left:0; top:0; width:104px; height:104px; z-index:8;
      offset-path:path("M 120 500 C 150 325 190 325 220 500 C 250 350 285 350 315 500 C 345 375 380 375 410 500 C 490 360 610 215 790 250 C 850 265 875 330 875 385");
      offset-rotate:0deg; animation:travel 5.2s infinite linear;
    }
    .ball {
      position:absolute; inset:0; border-radius:50%; overflow:hidden;
      background:#ef7d22; border:4px solid #47240f; box-shadow:inset -18px -18px 22px rgba(115,45,4,.34), inset 12px 10px 18px rgba(255,198,95,.45), 0 13px 15px rgba(0,0,0,.22);
      animation:spin 5.2s infinite linear;
    }
    .ball::before { content:""; position:absolute; width:130%; height:48%; border:4px solid #47240f; border-radius:50%; left:-15%; top:24%; transform:rotate(18deg); }
    .ball::after { content:""; position:absolute; width:45%; height:130%; border:4px solid #47240f; border-radius:50%; left:25%; top:-15%; transform:rotate(-15deg); }
    .seam { position:absolute; width:4px; height:110%; background:#47240f; left:50%; top:-5%; transform:rotate(30deg); }
    .hello { position:absolute; inset:0; display:grid; place-items:center; color:white; font-weight:900; font-size:17px; line-height:.9; text-align:center; text-transform:uppercase; text-shadow:1px 2px 2px #542300; z-index:2; transform:rotate(-8deg); }
    .ball-shadow { position:absolute; width:110px; height:22px; left:113px; top:583px; border-radius:50%; background:rgba(42,29,18,.24); filter:blur(3px); animation:shadow 5.2s infinite linear; }
    .title { position:absolute; left:50%; top:5%; transform:translateX(-50%); color:white; font-size:clamp(24px,4vw,52px); font-weight:900; letter-spacing:3px; text-transform:uppercase; text-shadow:0 4px 0 #356d9a; white-space:nowrap; }
    @keyframes travel { 0% {offset-distance:0%} 80%,100% {offset-distance:100%} }
    @keyframes spin { to { transform:rotate(1080deg); } }
    @keyframes shadow { 0%{transform:translateX(0) scale(1);opacity:.7} 19%{transform:translateX(100px) scale(.85)} 39%{transform:translateX(195px) scale(.75)} 57%{transform:translateX(290px) scale(.65)} 80%{transform:translateX(750px) scale(.3);opacity:.1} 100%{transform:translateX(750px) scale(.3);opacity:0} }
    @keyframes swish { 0%,72%,100%{transform:skewX(0)} 79%{transform:skewX(12deg) scaleY(1.15)} 86%{transform:skewX(-7deg) scaleY(.92)} 93%{transform:skewX(3deg)} }
    @media (max-width:700px) {
      .scene { transform:scale(.68); transform-origin:center; width:1000px; flex:none; }
      .title { top:10%; }
    }
    @media (prefers-reduced-motion: reduce) { .ball-wrap,.ball,.ball-shadow,.net { animation-play-state:paused; } }
  </style>
</head>
<body>
  <main class="scene" aria-label="An animated basketball saying Hello World dribbles and shoots into a hoop">
    <div class="sun"></div><div class="cloud"></div>
    <div class="title">Hello, World!</div>
    <div class="court"></div>
    <div class="ball-shadow"></div>
    <div class="ball-wrap"><div class="ball"><span class="seam"></span><span class="hello">Hello<br>World</span></div></div>
    <div class="goal"><div class="pole"></div><div class="base"></div><div class="board"></div><div class="rim"></div><div class="net"></div></div>
  </main>
</body>
</html>

Reaches out to

Nothing. This page is entirely self-contained and contacts no other website when it runs.

Licence

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 Apollo Williamson. Licensed under the MIT License. Published on Globefin.

Provided as is, without warranty. Any external libraries it loads keep their own licences. Terms →

Sandbox

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.