CSS+HTML to implement Skeleton Screen loading placeholder animation effect (with animation)

CSS+HTML to implement Skeleton Screen loading placeholder animation effect (with animation)

Effect

Fading from top to bottom

Source code

html, using angular syntax, just make simple changes to get the syntax you need

<div *ngFor="let item of [1,1,1],index as index" class="skeletonItem anim-opacity2 animation-delay{{index}}">
        <div class="skeletonText"></div>
        <div class="skeletonText" style="width:70%"></div>
        <div class="skeletonText" style="width:40%"></div>
      </div>

CSS

.skeletonItem {
      padding: 16px;
      border-bottom: 3px solid #eee;
    }

    .skeletonText {
      height: 16px;
      background: #e2e2e2;
      margin-top: 12px;
      border-radius: 4px;
    }

    .skeletonText:first-child {
      margin-top: 0;
    }
    .anim-opacity2 {
      animation: 1.5s opacity2 0s infinite;
    }
    .animation-delay0 {
      animation-delay: 0s;
    }
    .animation-delay1 {
      animation-delay: 0.5s;

    }
    .animation-delay2 {
      animation-delay: 1s;
    }

    @keyframes opacity2 {
      0% {
        opacity: 0.5
      }
      50% {
        opacity: 1;
      }
      100% {
        opacity: 0.5;
      }
    }

Summarize

This is the end of this article about how to use CSS+HTML to implement the Skeleton Screen loading placeholder animation effect (with animation). For more related Skeleton Screen loading placeholder content, please search 123WORDPRESS.COM’s previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

<<:  Docker image optimization (from 1.16GB to 22.4MB)

>>:  Learn how to use JavaScript's new Element Traversal property to traverse child elements

Recommend

Solve the problem of MySQL using not in to include null values

Notice! ! ! select * from user where uid not in (...

MySQL master-slave synchronization principle and application

Table of contents 1. Master-slave synchronization...

How to solve the problem of blurry small icons on mobile devices

Preface Previously, I talked about the problem of...

Detailed analysis of the principles and usage of MySQL views

Preface: In MySQL, views are probably one of the ...

How to implement https with nginx and openssl

If the server data is not encrypted and authentic...

What do CN2, GIA, CIA, BGP and IPLC mean?

What is CN2 line? CN2 stands for China Telecom Ne...

Six border transition effects implemented by CSS3

Six effectsImplementation Code html <h1>CSS...

Detailed example of Linux all-round system monitoring tool dstat

All-round system monitoring tool dstat dstat is a...

HTML Tutorial: HTML horizontal line segment

<br />This tag can display a horizontal line...

Design Tips: We think you will like it

<br />Looking at this title, you may find it...

Detailed tutorial on installing Nginx 1.16.0 under Linux

Because I have been tinkering with Linux recently...

Example of converting webpack images to base64

Download url-loader yarn add -D url-loader module...

Detailed tutorial for installing mysql5.7.21 under Windows

This article shares the installation tutorial of ...

Implementation of css transform page turning animation record

Page turning problem scenario B and C are on the ...

Introduction to the process of creating TCP connection in Linux system

Table of contents Steps to create TCP in Linux Se...