Pure CSS to achieve candle melting (water droplets) sample code

Pure CSS to achieve candle melting (water droplets) sample code

Achieve results

When it rains, collect your clothes

Implementation ideas

The melting effect is achieved using the contrast and blur of the filfilter.
Setting contrast in the parent element and blur in the child element can achieve the effect of blending the two.

Code

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Water drop effect</title>
  <link rel="stylesheet" type="text/css" href="css/index.css">
</head>
<body>
  <div class="hpc">Put away your clothes when it rains</div>
</body>
</html>
html,body{
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  filter:contrast(20);
}


.both{
  left: 0;
  content: "";
  width: 10px;
  height: 20px;
  bottom: -20px;
  border-radius: 50%;
  position: absolute;
  background-color: #fff;
}
.hpc{
  top: 80px;
  left: 100px;
  color: #fff;
  width: 400px;
  height: 107px;
  font-size: 6rem;
  filter: blur(3px);
  font-style: italic;
  position: relative;
  transform: skewY(5deg);
  font-family: "Comic Sans MS";
  border-bottom: 10px solid #fff;

  &::before{
    @extend .both;
    animation: move 6s ease-in-out infinite;
  }

  &::after{
    @extend .both;
    animation: move 6s 1s ease-in-out infinite;
  }

  @keyframes move{
    70%
      bottom: -20px;
      transform: translate(380px, 5px);
    }
    80%
      transform: translate(380px, 3px);
      opacity: 1;
    }
    100%{
      transform: translate(380px, 180px);
      opacity: 0;
    }
  }
}

Just convert SCSS to CSS and import it.

This concludes this article about the sample code for implementing candle melting (water drops) with pure CSS. For more relevant CSS candle melting content, please search 123WORDPRESS.COM’s previous articles or continue browsing the related articles below. I hope you will support 123WORDPRESS.COM in the future!

<<:  A brief discussion on when MySQL uses internal temporary tables

>>:  Hbase installation and configuration tutorial under Linux

Recommend

Docker custom network implementation

Table of contents 1. Customize the network to rea...

The latest popular script Autojs source code sharing

Today I will share with you a source code contain...

Detailed explanation of the use of router-view components in Vue

When developing a Vue project, you often need to ...

Jmeter connects to the database process diagram

1. Download the MySQL jdbc driver (mysql-connecto...

Docker container accesses the host's MySQL operation

background: There is a flask project that provide...

MySQL max_allowed_packet setting

max_allowed_packet is a parameter in MySQL that i...

How to use docker+devpi to build local pypi source

Some time ago, I needed to use pip downloads freq...

The whole process of configuring hive metadata to MySQL

In the hive installation directory, enter the con...

XHTML Tutorial: XHTML Basics for Beginners

<br />This site’s original content, please i...

5 MySQL GUI tools recommended to help you with database management

There are many database management tools for MySQ...

Explanation of the steps for Tomcat to support https access

How to make tomcat support https access step: (1)...

Pure CSS to achieve cool charging animation

Let’s take a look at what kind of charging animat...