UNPKG

spin-wheel

Version:

An easy to use, themeable component for randomising choices and prizes.

71 lines (60 loc) 1.09 kB
* { margin: 0; padding: 0; font-family: 'Lucida Grande', sans-serif; font-size: 15px; -webkit-tap-highlight-color: transparent; user-select: none; /* Prevent selecting ui text when dragging */ } html, body { height: 100%; } body { /* Prevent pull-down-to-refresh gesture */ overscroll-behavior-y: contain; /* Prevent iOS rubber-band effect */ position: fixed; width: 100%; /* Prevent browser from handling touch events */ touch-action: none; display: flex; flex-direction: column; justify-items: stretch; align-items: stretch; } .wheel-wrapper { position: relative; overflow: hidden; height: 100%; width: 100%; } .wheel-1 { height: 100%; width: 100%; } .wheel-2 { height: 100%; width: 100%; position: absolute; top: 0px; } .gui-wrapper { padding: 10px; background-color: #f3f3f3; display: flex; flex-direction: column; gap: 10px; } button { padding: 10px 20px; cursor: pointer; margin-right: 10px; max-width: 100px; } svg { position: absolute; top: 0px; height: 100%; width: 100%; color: magenta; }