Sarnath India
  • Home
  • NodeJs
  • PHP
  • CSS
  • Javascript
  • Privacy Policy
  • Terms and Conditions
  • Disclaimer
  • DMCA
  • About Us

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

How to Install Node.Js on Windows Machine

March 23, 2023

Image/File Upload with Progressbar Using PHP & Jquery

March 1, 2023

Display location on google map from address using javascript google map api

March 1, 2023
Facebook Twitter Instagram
Sarnath India
  • Home
  • NodeJs
  • PHP
  • CSS
  • Javascript
Sarnath India
Home»CSS»CSS Skeleton Loadings Example + Source Code
CSS

CSS Skeleton Loadings Example + Source Code

sarnathindiaBy sarnathindiaFebruary 27, 20233 Mins Read
Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Tumblr Email
CSS Skeleton Loadings Example + Source Code
Share
Facebook Twitter LinkedIn Pinterest Email

CSS skeleton loading is a popular technique used to improve the user experience on websites. This technique involves displaying a basic layout of the page before the actual content is loaded.

This helps to reduce the perceived loading time and keeps the user engaged. In this article, we’ll take a look at 10+ CSS skeleton loading examples with source code.

CSS Skeleton Loadings Example

  1. Simple Skeleton Loading

This example uses a simple skeleton loading animation with a gray background and a white border. The animation is created using CSS animations and transitions.

Source Code:

CSS
<div class="skeleton">
  <div class="skeleton-box"></div>
</div>

.skeleton {
  background-color: #eee;
  border: 1px solid #ccc;
  height: 100px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.skeleton-box {
  width: 100%;
  height: 100%;
  position: absolute;
  left: -100%;
  top: 0;
  animation: skeleton-animation 1s infinite linear;
}

@keyframes skeleton-animation {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}
CSS
  1. Circular Skeleton Loading

This example uses a circular skeleton loading animation with a white background and a gray border. The animation is created using CSS animations and transforms.

Source Code:

CSS
<div class="skeleton">
  <div class="skeleton-box"></div>
</div>

.skeleton {
  background-color: #fff;
  border: 1px solid #ccc;
  height: 100px;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
}

.skeleton-box {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  transform: scale(0);
  animation: skeleton-animation 1s infinite linear;
}

@keyframes skeleton-animation {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
CSS
  1. Rectangular Skeleton Loading

This example uses a rectangular skeleton loading animation with a gray background and a white border. The animation is created using CSS animations and transforms.

Source Code:

CSS
<div class="skeleton">
  <div class="skeleton-box"></div>
</div>

.skeleton {
  background-color: #eee;
  border: 1px solid #ccc;
  height: 100px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.skeleton-box {
  width: 100%;
  height: 50%;
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-100%);
  animation: skeleton-animation 1s infinite linear;
}

@keyframes skeleton-animation {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}
CSS
  1. Wave Skeleton Loading

This example uses a wave skeleton loading animation with a gray background and a white border. The animation is created using CSS animations and transforms.

Source Code:

CSS
<div class="skeleton">
  <div class="skeleton-box"></div>
</div>

.skeleton {
  background-color: #eee;
  border: 1px solid #ccc;
  height: 100px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.skeleton-box {
  width: 100%;
CSS

CSS skeleton loading is a great technique to improve the user experience on websites by displaying a basic layout of the page before the actual content is loaded. It reduces the perceived loading time and keeps the user engaged.

CSS
Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Tumblr Email
sarnathindia
  • Website

My name is Rohit Vadaviya and I am Programmer, Analyst And Blogger based in Baroda, India. I try to share some awesome scripts on my blog which I personally feel are useful for me as well as all developers, programmers and designers while working on any project.

Related Posts

CSS February 28, 2023

How to create rounded profile picture using pure CSS

CSS February 28, 2023

CSS Media Queries for All The Common Devices

CSS February 27, 2023

CSS Wave Animation Examples

Leave A Reply Cancel Reply

Top Posts

How to import excel file into mysql using php

February 26, 202329 Views

How to create chat application using node.js and socket.io

February 26, 202323 Views

Read RSS feed of website (blog) using php

February 27, 202318 Views

Subscribe to Updates

Get the latest tech news from FooBar about tech, design and biz.

Most Popular

How to import excel file into mysql using php

February 26, 202329 Views

How to create chat application using node.js and socket.io

February 26, 202323 Views

Read RSS feed of website (blog) using php

February 27, 202318 Views
Our Picks

How to Install Node.Js on Windows Machine

March 23, 2023

Image/File Upload with Progressbar Using PHP & Jquery

March 1, 2023

Display location on google map from address using javascript google map api

March 1, 2023

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

Sarnath India
  • Home
  • About Us
  • Privacy Policy
  • Terms and Conditions
  • Disclaimer
  • DMCA
© 2023 ThemeSphere. Designed by ThemeSphere.

Type above and press Enter to search. Press Esc to cancel.