Skip to content

Rising sun

A sun rises behind hills then slowly radiates, for the warm header of a guesthouse, a campsite or a solar brand.

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

Description

Above the card, a small landscape drawn in CSS (gradient sky, two rounded hills) sees the sun rise behind the horizon on load, then its rays turn endlessly, very slowly. Pastel dawn in light mode, purple and orange dusk in dark mode. Everything is made of gradients, with no image or script, and only transforms are animated; the scene is decorative and hidden from screen readers, while the text, on the card below, keeps AA contrast. The sky, sun and hill colours are set with variables (--efsl-sky, --efsl-sun, --efsl-back, --efsl-front). With prefers-reduced-motion the sun has already risen and the rays are still. Example: guest rooms in Provence.

Code

Loading the code…

The code of this component in

Archive contents

effet-soleil-levant-html-tailwind.zip3 files · 4 Ko

  • index.html3 Ko
  • README.md3 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