JSFiddle - React, Tailwind, and code Playground

by Brynner

HTML

<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hello World with Snow</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div class="content">Hello World</div>
    <!-- Vários elementos de floco de neve para a animação -->
    <div class="snowflake"></div>
    <div class="snowflake"></div>
    <!-- ... repita conforme necessário ... -->
    <div class="snowflake"></div>
</body>
</html>

CSS

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #0077BB;
    overflow: hidden;
}

.content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    color: white;
}

.snowflake {
    position: absolute;
    background-color: white;
    width: 5px;
    height: 5px;
    border-radius: 50%;  /* This will make the div round, resembling a simple snowflake */
    opacity: 0.7;
    animation-name: snowfall;
    animation-timing-function: linear;
    pointer-events: none;
}

@keyframes snowfall {
    to {
        transform: translateY(110vh);
    }
}