Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

Save Automatically?

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="container">
  <div class="america">
    <div class="america-blue">
      <div class="star-row">
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
      </div>
      <div class="star-row-5">
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
       
      </div>
      <div class="star-row">
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
      </div>
      <div class="star-row-5">
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
       
      </div>
      <div class="star-row">
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
      </div>
      <div class="star-row-5">
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
       
      </div>
      <div class="star-row">
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
        <svg class="star">
          <use xlink:href="#star"></use>
        </svg>
      </div>
    </div>
    <div class="stripes">
      <div class="stripe"></div>
      <div class="stripe"></div>
      <div class="stripe"></div>
      <div class="stripe"></div>
      <div class="stripe"></div>
      <div class="stripe"></div>
    </div>
  </div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0"  fill="white" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
    <defs>
    <symbol id="star" fill="white" viewBox="0 0 250 250">
       <path d="m55,237 74-228 74,228L9,96h240"/>
     </symbol>
    </defs>
 </svg>
              
            
!

CSS

              
                body {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(90deg, #041E42 20%, #9b1c2c 100%);
}
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;

}
.america {
  width: 900px;
  min-width: 900px;
  height: 450px;
  background: #BF0A30;
  position: relative;
  box-shadow: 0px 20px 80px 10px rgba(0,0,0,.25);
}
.america-blue {
  position: absolute;
  top: 0;
  left: 0;
  width: 378px;
  height: calc((450px / 13) * 7);
  background-color: #002868;
  z-index: 1;
  padding: 13px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stripe {
  background-color: white;
  width: 100%;
  height: calc(450px / 13);
}

.stripe:nth-child(1) {
  animation: 1000ms ease 0ms forwards animateDown;
}
.stripe:nth-child(2) {
  animation: 1200ms ease-in-out 0ms forwards animateDown;
}
.stripe:nth-child(3) {
  animation: 1400ms ease-in-out 0ms forwards animateDown;
}
.stripe:nth-child(4) {
  animation: 1600ms ease-in-out 0ms forwards animateDown;
}
.stripe:nth-child(5) {
  animation: 1800ms ease-in-out 0ms forwards animateDown;
}
.stripe:nth-child(6) {
  animation: 2000ms ease-in-out 0ms forwards animateDown;
}

@keyframes animateDown {
  0% {
    margin-top: 0;
  }
  100% {
    margin-top: calc(450px / 13);
  }
}

.star {
  height: 24px;
  width: 24px;
}
.star-row {
  display: flex;
  justify-content: space-between;
}

.star-row:nth-child(1) .star {
  animation: 1000ms ease-in-out 0ms forwards spinMove;
}

.star-row:nth-child(3) .star {
  animation: 1400ms ease-in-out 0ms forwards spinMove;
}

.star-row:nth-child(5) .star {
  animation: 1800ms ease-in-out 0ms forwards spinMove;
}

.star-row:nth-child(7) .star {
  animation: 2000ms ease-in-out 0ms forwards spinMove;
}

.star-row .star:nth-child(6) {
  margin-right: 0;
  animation: 1000ms ease-in-out spin;
}

.star-row-5 {
  display: flex;
  justify-content: space-between;
  padding: 8px 27px;
}

.star-row-5:nth-child(2) .star {
  animation: 1200ms ease-in-out 0ms forwards spinMove;
}
.star-row-5:nth-child(4) .star {
  animation: 1400ms ease-in-out 0ms forwards spinMove;
}
.star-row-5:nth-child(6) .star {
  animation: 1600ms ease-in-out 0ms forwards spinMove;
}
.star-row-5 .star:nth-child(5) {
  margin-right: 0;
  animation: 800ms ease-in-out forwards spin;
}

@keyframes spinMove {
  0% {
    transform: rotate(0deg)
  }
  100% {
    transform: rotate(360deg)
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg)
  }
  100% {
    transform: rotate(360deg)
  }
}


@media (max-width: 1000px) {
  .america {
    transform: scale(.75);
  }
}
@media (max-width: 725px) {
  .america {
    transform: scale(.5);
  }
}
@media (max-width: 475px) {
  .america {
    transform: scale(.375);
  }
}

@media (max-width: 340px) {
  .america {
    transform: scale(.325);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console