Pen Settings



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


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.


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.


                <!--Chapter 3 - CSS responsive loader using SVG-->
  <svg viewbox="0 0 660 300" width="100%" height="300px">
    <!-- 11 rectangles-->
    <rect width="60" height="300" x="0%" />
    <rect width="60" height="300" x="10%" />
    <rect width="60" height="300" x="20%" />
    <!--Offset each rectangle on the x axis by 10%-->
    <rect width="60" height="300" x="30%"/>
    <rect width="60" height="300" x="40%"/>
    <rect width="60" height="300" x="50%"/>
    <rect width="60" height="300" x="60%"/>
    <rect width="60" height="300" x="70%"/>
    <rect width="60" height="300" x="80%"/>
    <rect width="60" height="300" x="90%"/>
    <rect width="60" height="300" x="100%"/>
  <h1>Scanning channels</h1>
  <p>This may take a few minutes</p>
  <!--Progress bar-->
  <progress id="file" width="100%" value="32" max="100">32%</progress>


  background: rgb(0 28 47);

/*Container for the loading component*/
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  /*Padding and margin*/
  margin: 40px auto;
  font: 300 100% 'Roboto', sans-serif;
  text-align: center;
  color: rgb(255 255 255);

/*Styling the progress bar*/
progress {
  /*Reset the browser default styling using the apperance property and set the value to none*/
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 20px;
  height: 3vw;
  width: 100%;
  background: rgb(26 51 68);
  border: none;

  /*Border radius*/
  border-radius: 20px;
  background: linear-gradient(to right, #0eb98f 0%,#4db3ff 100%);
  /*Border radius*/
  border-radius: 20px;
  background: #0eb98f;
  background: linear-gradient(to right, #0eb98f 0%,#4db3ff 100%);
  font-size: 4.5vw;
  /*Padding and margin*/
  margin: 40px 0 12px;

  font-size: 2.8vw;
  /*Padding and margin*/
  margin-top: 0;

/*Loading bars*/
svg rect{
  /*Fill rather than background because it's an SVG graphic*/
  fill: rgb(34 184 142);
  animation: scale 2.2s infinite;
  /*To animate it from the center point use the transform-origin proprty*/
  transform-origin: center;

svg rect:nth-child(1){
  /*Delay the animation by 0.2s for each item*/
  animation-delay: 0;
  fill: rgb(26 159 140)

svg rect:nth-child(2){
  animation-delay: 200ms;
  fill: rgb(30 171 141)

svg rect:nth-child(3){
  animation-delay: 400ms;
  fill: rgb(32 179 142)

svg rect:nth-child(4){
  animation-delay: 600ms;
  fill: rgb(34 183 141)

svg rect:nth-child(5){
  animation-delay: 800ms;
  fill: rgb(34 184 142)

svg rect:nth-child(6){
  animation-delay: 1s;
  fill: rgb(33 180 141)

svg rect:nth-child(7){
  animation-delay: 1.2s;
  fill: rgb(30 175 142);

svg rect:nth-child(8){
  animation-delay: 1.4s;
  fill: rgb(28 164 141);

svg rect:nth-child(9){
  animation-delay: 1.6s;
  fill: rgb(23 150 139)

svg rect:nth-child(10){
  animation-delay: 1.8s;
  fill: rgb(18 134 136)

svg rect:nth-child(11){
  animation-delay: 2s;
  fill: rgb(18 134 136)

/*Create the keyframes, set the starting from position, then at 50% is the smallest amount of the rectangle, then return to full size*/
@keyframes scale {
  from {
    transform: scaleY(1);
  50% { 
    transform: scaleY(0.2);