Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="intro">
  <h1>Skeleton loading</h1>
  <p>Basic elements with slow wave motion from the left to the right side.
  </p>
</div>

<div class="container">
      <div class="card">
        <div class="card-image loading"></div>
        <div class="loading card-title"></div>
        <div class="loading card-description"></div>
      </div>

      <div class="card">
        <div class="loading card-title"></div>
        <div class="loading card-title shorter-m"></div>
        <div class="loading card-title shorter-s"></div>
        <div class="card-chart loading"></div>
        <div class="loading card-title shorter-m"></div>
        <div class="loading card-title"></div>
      </div>
  
      <div class="table">
        <div class="loading card-title shorter-s"></div>
        <div class="loading table-content"></div>
        <div class="loading table-content"></div>
        <div class="loading table-content"></div>
        <div class="loading table-content"></div>
      </div>
</div>

<p class="footer">Inspired by https://codepen.io/sheikh_ishaan/pen/BaNZNGM</p>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@400;500;700&display=swap');

* {
  margin: 16px;
  padding: 16px;
  font-family: 'Red Hat Display', sans-serif;
}

body {
  background-color: #ededed;
}

.intro{
  background-color: #F2E786;
  width: 100%;
  text-align: center;
}

h1{
  font-size: 48px;
  color: black;
  font-weight: 900;
  display: inline;
  background-image: linear-gradient(#F2E786 60%, #F9AAE7 5%);
}

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}
.container .card {
  background-color: #fff;
  height: auto;
  width: auto;
  overflow: hidden;
  margin: 12px;
  border-radius: 3px;
  box-shadow: 9px 17px 45px -29px rgba(0, 0, 0, 0.44);
}
.container .card-image img {
  width: 100%;
  height: 100%;
}
.container .card-image.loading {
  height: 300px;
  width: 400px;
  border-radius:3px;
}
.container .card-chart img {
  width: 100%;
  height: 100%;
}
.container .card-chart.loading {
  height: 300px;
  width: 300px;
  border-radius:50%;
}

.container .card-title {
  padding: 8px;
  font-size: 22px;
  font-weight: 700;
}
.container .card-title.loading {
  height: 1rem;
  margin: 1rem;
  border-radius: 3px;
  width: 85%;
}

.container .card-title.loading.shorter-m{
  width: 50%;
}

.container .card-title.loading.shorter-s{
  width: 25%;
}

.container .card-description {
  padding: 8px;
  font-size: 16px;
}
.container .card-description.loading {
  height: 2rem;
  border-radius: 3px;
}

.loading {
  position: relative;
  background-color: #f5f5f5;
  overflow: hidden;
}
.loading::after {
  display: block;
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  transform: translateX(-100%);
  animation: 2s loading linear 0.5s infinite;
  background: linear-gradient(90deg, transparent, #ededed, transparent);
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  transform: translateX(-100%);
  z-index: 1;
}

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

.footer{
  text-align:center;
  color: #ccc;
}

.container .table {
  background-color: #fff;
  height: auto;
  width: 60%;
  overflow: hidden;
  margin: 12px;
  border-radius: 3px;
  box-shadow: 9px 17px 45px -29px rgba(0, 0, 0, 0.44);
}

.container .table-content {
  padding: 8px;
  font-size: 22px;
  font-weight: 700;
}
.container .table-content.loading {
  height: 1rem;
  margin: 1rem;
  border-radius: 3px;
  width: 92%;
}
              
            
!

JS

              
                
              
            
!
999px

Console