DEV Community

Raimon
Raimon

Posted on • Edited on

1

🌨️❄️ New Feature: Wintry Clouds and Snow on Our Buttons! ❄️🌨️

Image description

At raimonvibe, we're embracing the winter spirit with an exciting new addition to our website: buttons featuring a beautiful cloud and snow effect! We've taken our designs a step further to bring you a touch of winter wonderland right on your screen.

How did we do this? With a bit of CSS magic! 🧙‍♂️✨ We combined a copyright-free cloud image with our existing snowflake images to create this enchanting effect. Here’s a peek at the code we used:

.button {
  /* Multiple background images for the snow and cloud effect */
  background: 
    url("../images/cloud.webp") no-repeat center, /* Cloud image centered */
    url("../images/snow75.webp") no-repeat 25% 0, /* First snow layer */
    url("../images/snow75.webp") no-repeat 50% 0, /* Second snow layer */
    url("../images/snow75.webp") no-repeat 100% 0, /* Third snow layer */
    -webkit-linear-gradient(right, #B1C6D9 0%, #8AB0C9 50%, #6997B9 75%, #3E7FA9 100%); /* Linear gradient background */

  /* Ensures that each background image does not repeat */
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;

  /* Positions each snow image, cloud image and gradient */
  background-position: 
    center,      /* Position of the cloud image */
    -20% -70%,   /* Position of the first snow layer */
    20% -70%,    /* Position of the second snow layer */
    80% -70%,    /* Position of the third snow layer */
    center;      /* Position of the linear gradient */
}

Enter fullscreen mode Exit fullscreen mode

Here's what each part of the code does:

Multiple Backgrounds: Layering different images of snowflakes (snow75.webp) on top of each other, creating a dynamic and realistic snow effect.
No Repeat: Ensuring these snowflake images don’t tile across the button, keeping them in their specified positions.
Background Positions: Controlling where each snow image is placed on the button, creating the illusion of snowflakes scattered across it. The -20%, 20%, and 80% values determine the horizontal placement, while -70% controls the vertical position.
Linear Gradient: Creating a color transition for the button’s background, adding depth and a wintry feel to it.
This combination of a cloud and snowflakes results in a unique and eye-catching design, merging snowflakes and a serene cloud against our buttons' backdrop. The outcome? A playful yet stylish touch that suits the wintry days.

Let us know what you think and if you find it as magical as we do! ☕🧣

Link to have a look at the December theme:
https://holidays-website-nextjs-com-v6.vercel.app/ThreeDLibrary

Image description

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay