Clouds Effect Pure HTML and CSS

Syiainfoku make a Clouds Effect Pure HTML and CSS
Clouds Effect Pure HTML and CSS

Hello !

Welcome back, with me the founder of Syiainfoku. You will learn together on the Syiainfoku blog how to make a Clouds Effect no JavaScript pure HTML and CSS.

Ok, let's get started

Preview Clouds Effect

Preview Clouds Effect

More or less the result will be like in the image above.

Source Code and Brief Explanation

To make this program [Clouds Effect]. First you need to create two Files, one HTML File and one CSS File. After creating these files, just paste the following code into your file. You can also download the source code file of this Clouds Effect from the given download button.

First, create an HTML file with the name index.html and paste the given code in your HTML file. Remember, you must create a file with an .html extension.

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Clouds Effect | hitoricoding</title>
<link rel="stylesheet" href="./assets/style.css">
</head>

<body>
<div class="banner">
<h2>CSS Clouds Effect</h2>
<div class="clouds">
<img src="./images/cloud1.png" style="--i:1;">
<img src="./images/cloud2.png" style="--i:2;">
<img src="./images/cloud3.png" style="--i:3;">
<img src="./images/cloud4.png" style="--i:4;">
<img src="./images/cloud5.png" style="--i:5;">
</div>
</div>
</body>

</html>

Finally, create a CSS file with the name style.css and paste the given code in your CSS file. Remember, you must create a file with a .css extension.

@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Poppins', sans-serif;
}

h2 {
padding: 200px 0px 0px 70px;
font-size: 70px;
color: #10294b;
text-shadow: 15px 15px 20px #ffffff;
}

.banner {
position: relative;
width: 100%;
height: 100vh;
background-image: url(../images/bg.jpg);
background-size: cover;
}

.banner .clouds {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
}

.banner .clouds img {
position: absolute;
bottom: 0;
max-width: 100%;
animation: animate calc(8s * var(--i)) linear infinite;
}

@keyframes animate {
0% {
transform: translateX(-100%);
}

100% {
transform: translateX(100%);
}
}

That's it, now you have successfully created a Clouds Effect, If your code is not working or you are facing any error/problem, please download the source code file from the given download button. It's free and a .zip file will be downloaded then you have to extract it.

Closing

Thank you for those of you who have read and downloaded this source code, hopefully it can be useful and add to your insight.

If you found this article useful, you can share it. That's all from me, and THANK YOU