Preloader – CodingNepal https://www.codingnepalweb.com CodingNepal is a blog dedicated to providing valuable and informative content about web development technologies such as HTML, CSS, JavaScript, and PHP. Tue, 02 May 2023 12:20:44 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.2 Create Loading Spinner in HTML & CSS https://www.codingnepalweb.com/create-loading-spinner-html-css/ https://www.codingnepalweb.com/create-loading-spinner-html-css/#respond Thu, 24 Nov 2022 21:11:21 +0000 https://www.codingnepalweb.com/?p=4142 Create Loading Spinner in HTML & CSShttps://www.codingnepalweb.com/wp-content/uploads/2022/11/Create20Loading20Spinner20in20HTML20amp20CSS.jpg

When you click on someone’s website or application, you may have seen the loader spinner. If you are looking for a quick and easy way to create a Loading Spinner then this blog is written for you.

This blog will teach you how to create a Loading Spinner using HTML and CSS only. Loader Spinners are used in many applications and websites. Usually, this kind of animation appears when a web page is loading. In my recent blog post, I have provided more than 16 Login & Registration From Templates which could be helpful for you.

Loading spinners are used when retrieving data or performing slow computations. They notify the user that their request is being processed. To keep your visitors and content watchers engaged while the page’s content loads, you may utilize loaders.

Have a look at the given image of the Loading Spinner. As you can see on the Loading Spinner, there is one plain color background and one spinner. This loader rotates 360 degrees indefinitely and smoothly.

I have explained all the HTML and CSS code that I have used to create this CSS Loading Spinner also if you want to make this CSS Loader with me step by step, then you can watch the video tutorial that I have given below.

Create a Loading Spinner in HTML & CSS | Video tutorial

All of the HTML and CSS code that I used to create this hover animation is provided. Instead of duplicating the code or downloading the source code file, I strongly advise you to watch the full video explanation of this Navigation Menu Hover Animation. By watching the video tutorial, you can create this Navigation Menu Hover Animation.

As you have seen in the video tutorial of this Loading Spinner. This type of loading is much more attractive and enhances user satisfaction.

I hope now you can create this Loading Spinner in HTML and CSS. If you want to take all the HTML and CSS code I have used to create this CSS Loader then all the source codes are given below.

You May Like This Video:

Loading Spinner in HTML CSS [Source Codes]

To create CSS Loader Spinner, follow the given steps line by line:
  1. Create a folder. You can name this folder whatever you want, and inside this folder, create the mentioned files.
  2. Create an index.html file. The file name must be index and its extension .html
  3. Create a style.css file. The file name must be style and its extension .css
  4. Create a script.js file. The file name must be script and its extension .js

Once you create these files, paste the given codes into the specified files. If you don’t want to do these then scroll down and download the Loading Spinner by clicking on the given download button.

First, paste the following codes into your index.html file.

<!DOCTYPE html>
<!-- Coding By CodingNepal - codingnepalweb.com -->
<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> Loading Spinner | CoderGirl </title>
  <!---Custom Css File!--->
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <div class="container">
    <div class="spinner"></div>
  </div>
</body>
</html>

Second, paste the following codes into your style.css file.

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
.container{

  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4285f4;
}
.spinner{
  width: 80px;
  height: 80px;
  border: 7px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinner 0.7s linear infinite;
}
@keyframes spinner{
  from{}
    to{
      transform: rotate(360deg);
    }
}

That’s all, now you’ve successfully created a project on CSS Loading Spinner. If your code doesn’t work or you’ve faced any problems, please download the source code files from the given download button. It’s free and a zip file containing the project folder with source code files will be downloaded.

 

]]>
https://www.codingnepalweb.com/create-loading-spinner-html-css/feed/ 0
Color Changing Shiny Loader using HTML & CSS https://www.codingnepalweb.com/color-changing-shiny-loader-html-css/ https://www.codingnepalweb.com/color-changing-shiny-loader-html-css/#comments Tue, 19 May 2020 09:06:00 +0000 https://codingnepalweb.com/2020/05/19/color-changing-shiny-loader-using-html-css/ Color Changing Shiny Loader using HTML & CSS

Hello readers, Today in this blog you’ll learn how to create a Color Changing Shiny Loader using only HTML & CSS. Previously I have shared a Star Rating Widget using HTML & CSS only. Now, it’s time to create a CSS Loader.

Preloaders (also known as loaders) are what you see on the webpage screen while the rest of the page contents is still loading. Preloaders or loaders are often easy or complex animations that are used to keep visitors entertained while server operations finish processing.

This loader rotates 360deg clockwise. In that meantime of rotating it changes their color to blue, orange, yellow, and green. That means when it completed rotates 90deg its color change blue to orange and when it completed rotates 180deg its color change from orange to yellow and when it completed rotates 360deg its color change from yellow to green. The center “loading…” text smoothly fade out and fades in when the loader is rotating.

If you’re feeling difficult to understand what I am saying. You can watch a full video tutorial on this program (Color Changing Shiny Loader).

Video Tutorial of Color Changing Shiny Loader

If you like this program (Color Changing Shiny Loader) and want to get source codes. You can easily get the source codes of this program. To get the source codes you just need to scroll down.

If you want to create a beautifully designed website and keep visitors entertained while server operations finish processing., then use any loader. Peoples which are beginners in HTML CSS, this design will the best practice and example for him/her.

Preloader Design in HTML & CSS [Source Codes]

As always, before sharing the codes of this program (Color Changing Shiny Loader). Let’s a few talks about the main tags and codes of this program. In the HTML File, first I created a <div> with the class name “center” and placed all other tags inside it. Then I created another <div> with the class name “ring”. Inside <div class=”center”> tag I created a <span> tag.

In the CSS File, first I reset default margins and padding to 0; and put the background color black. Then I placed all elements at the center using CSS Flex property.

After placed elements at the center, I created a square box of height: 200px and width: 200px; Then I gave a border radius of 50%; to this square, to create a circle. And using :before pseudo-element, I created a duplicate layer of circle box of the same height-width. After that, I placed that loading… text at the center of the circle box. At last, I created an animation in the ring container and give the animation name. Then using @keyframe property I call this animation and rotates this ring 360deg clockwise. Inside @keyframe I gave that ring different colors at different degrees.

To create this program (Color Changing Shiny Loader). First, you need to create two Files one HTML File and another one is CSS File. After creating these files just paste the following codes in your file. First, create an HTML file with the name of index.html and paste the given codes in your HTML file. Remember, you’ve to create a file with .html extension.

<!DOCTYPE html>
<!-- Created By CodingNepal -->
<html lang="en" dir="ltr">
   <head>
      <meta charset="utf-8">
      <title>Loading Animation</title>
      <link rel="stylesheet" href="style.css">
   </head>
   <body>
      <div class="center">
         <div class="ring"></div>
         <span>loading...</span>
      </div>
   </body>
</html>

Second, create a CSS file with the name of style.css and paste the given codes in your CSS file. Remember, you’ve to create a file with .css extension.

body{
  margin: 0;
  padding: 0;
  font-family: montserrat;
  background: black;
}
.center{
  display: flex;
  text-align: center;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
.ring{
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  animation: ring 2s linear infinite;
}
@keyframes ring {
  0%{
    transform: rotate(0deg);
    box-shadow: 1px 5px 2px #e65c00;
  }
  50%{
    transform: rotate(180deg);
    box-shadow: 1px 5px 2px #18b201;
  }
  100%{
    transform: rotate(360deg);
    box-shadow: 1px 5px 2px #0456c8;
  }
}
.ring:before{
  position: absolute;
  content: '';
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(255,255,255,.3);
}
span{
  color: #737373;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 200px;
  animation: text 3s ease-in-out infinite;
}
@keyframes text {
  50%{
    color: black;
  }
}

That’s all, now you’ve successfully created a Color Changing Shiny Loader using HTML & CSS. If your code not work or you’ve faced any errors/problems then please comment down or contact us from the contact page.

]]>
https://www.codingnepalweb.com/color-changing-shiny-loader-html-css/feed/ 5