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

Implementation of importing and exporting vue-element-admin projects

vue-element-admin import component encapsulation ...

MySQL Daemon failed to start error solution

MySQL Daemon failed to start error solution A few...

Detailed explanation of mixins in Vue.js

Mixins provide distributed reusable functionality...

One question to understand multiple parameters of sort command in Linux

The sort command is very commonly used, but it al...

Detailed explanation of vue keepAlive cache clearing problem case

Keepalive is often used for caching in Vue projec...

JavaScript programming through Matlab centroid algorithm positioning learning

Table of contents Matlab Centroid Algorithm As a ...

Interviewers often ask questions about React's life cycle

React Lifecycle Two pictures to help you understa...

Detailed explanation of Linux inotify real-time backup implementation method

Real-time replication is the most important way t...

Summary of the Differences between find() and filter() Methods in JavaScript

Table of contents Preface JavaScript find() Metho...

How to deploy zabbix_agent in docker

zabbix_agent deployment: Recommendation: zabbix_a...

Example of how to enable Slow query in MySQL

Preface Slow query log is a very important functi...

WeChat applet implements calculator function

WeChat Mini Programs are becoming more and more p...

Summary of basic knowledge points of MySql database

Table of contents Basic database operations 2) Vi...

Detailed steps to build an NFS file sharing server in Linux

Linux builds NFS server In order to achieve data ...