Pen Settings



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


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


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.


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.


                <div class="container">
  <section class="card">
    <figure class="card-image loading"></figure>
    <div class="card-detail">
      <h3 class="card-title loading"></h3>
      <p class="card-description loading"></p>



                $border-color: #dae1e7;
$background-color: #f4f4f4;
$text-color: #333;

body {
  background: $background-color;
  margin: 0;
  padding: 0;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue;
  color: $text-color;

.container {
  margin: 2rem auto;
  max-width: 800px;
  display: flex;
  justify-content: center;

.card {
  overflow: hidden;
  background: white;
  border-radius: .25rem;
  max-width: 380px;
  width: 380px;
    0 15px 30px 0 rgba(0,0,0,0.05),
    0 5px 15px 0 rgba(0,0,0,.05);
  transition: ease box-shadow 0.3s;
  &:hover {
    0 15px 60px 0 rgba(0,0,0,0.08),
    0 5px 25px 0 rgba(0,0,0,.08);

.card-detail {
  padding: .5rem 1rem;
  h3 { 
    font-size: 1.5rem; 
    margin-bottom: none; 
    line-height: .09;
  p {
    line-height: 1.3rem;  

.card-image {
  margin: 0;
  padding: 0;
  height: 200px;
  overflow: hidden;
  img {
    max-width: 100%;
    height: auto;

.loading {
  position: relative;
  background-color: #E2E2E2;
  &.card-image {
    border-radius: 0;
  &::after {
    display: block;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
    animation: loading 1.5s infinite;

@keyframes loading {
  100% {
    transform: translateX(100%);

.card-title.loading {
  height: 1.8rem;

.card-image.image {
  max-width: 100%;
  height: auto;

.card-description.loading {
  height: 80px;


                /* Let's Build: With JavaScript -
   Subscribe on YouTube -
   Let's Build: Skeleton Screens 

const cardImage = document.querySelector('.card-image');
const cardTitle = document.querySelector('.card-title');
const cardDesc = document.querySelector('.card-description');

const renderCard = () => {
  cardTitle.textContent = 'Card Title Yo!';  
  cardDesc.textContent = 'Lorem ipsum dolor, sit amet consectetur adipisicing elit. Vero dicta repellat quibusdam assumenda at distinctio similique eos? Officiis voluptatem accusamus, id odit, quos eaque nemo, dicta quidem eum eligendi veritatis.';

function createImage() {
  const img = new Image();
  img.setAttribute('alt', 'A cloud day at a mountain base');
  img.setAttribute('src', '');

setTimeout(() => {
}, 5000);

// window.addEventListener('load', () => {
//   renderCard();
// });