<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Rain background</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<section>
</section>
</body>
</html>
*{
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
section{
position: relative;
height: 100vh;
width: 100%;
background-image: url('https://www.thisiscolossal.com/wp-content/uploads/2018/11/HenriPrestes_02.jpg');
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
section::before{
content: '';
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-image: url('http://pngimg.com/uploads/rain/rain_PNG13468.png');
animation: rain 0.19s ease-in infinite;
}
@keyframes rain{
0%{
background-position: 10 0;
}
100%{
background-position: 20% 80%;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.