Skip to content

Spinning vinyl record

A vinyl record spins on its turntable next to the text, with an accessible pause switch, all in CSS with no script.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

On a small turntable drawn in CSS (platter, tonearm), an LP with realistic grooves spins at a steady speed, red label in the middle: the ideal header for a record shop, a community radio, a music bar or a festival. Grooves and label are radial gradients, with no image, and only the rotation is animated. Since the animation lasts, a real “Pause the record” checkbox stops it (WCAG 2.2.2), without a line of script thanks to the :has selector; it works with the keyboard and has a visible focus outline. The turntable is decorative and hidden from screen readers, and the text keeps AA contrast in light and dark mode. Speed set with --efvr-speed. With prefers-reduced-motion the record is still and the switch, now useless, disappears. Two-column layout, then a single one from 360 px.

Code

Loading the code…

The code of this component in

Archive contents

effet-vinyle-rotatif-html-tailwind.zip3 files · 4 Ko

  • index.html4 Ko
  • README.md4 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 2, 2026.

Reviews

No reviews yet.

In the same spirit

  • Cards that fade in as they enter the screen, one after another in each row, without a line of JavaScript and with a static fallback.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A translucent card with a saturated blur whose sharper edge refracts the colourful shapes drifting behind it, with an opaque fallback when transparency is reduced.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A help block shaped like a conversation: bubbles, three animated typing dots and clickable quick replies that show your answers to frequent questions, frozen under prefers-reduced-motion.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component