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

              
                    <body>
      <!-- Ladebalken 1 -->
<div class="lade-container-1">
  <div class="lade-balken-1"></div>
</div>

<!-- Ladebalken 2 -->
<div class="lade-container-2">
  <div class="lade-balken-2" id="balken2"></div>
  <div class="prozent-text-2" id="text2">0%</div>
</div>

<!-- Kreis-Ladeanzeige 3 -->
<div class="kreis-loader-3">
  <svg viewBox="0 0 160 160">
    <circle class="kreis-bg-3" cx="80" cy="80" r="70"/>
    <circle class="kreis-fortschritt-3" cx="80" cy="80" r="70"/>
  </svg>
  <div class="kreis-text-3" id="kreis-prozent-3">0%</div>
</div>

<!-- Ladebalken 4 (stockend) -->
<div class="stockender-container-4">
  <div class="stockender-balken-4" id="balken4"></div>
  <div class="prozent-text-4" id="prozent4">0%</div>
</div>
      <!-- Weitere Ladeelemente -->
        <div class="preset">
            <div class="loader1"></div>
            <div class="loader2container">
                <div class="loader2"></div>
            </div>
            <div class="loader3"></div>
            <div class="loader4">Loading</div>
            <div class="loader5"></div>
            <div class="loader6"></div>
            <div class="loader7"></div>
            <div class="loader8"></div>
            <div class="button"></div>
            <div class="loader9"></div>
        </div>
    </body>
              
            
!

CSS

              
                /* ################################ LADEBALKEN ################################ */
/* Allgemein */
.lade-container-1, .lade-container-2, .stockender-container-4 {
  width: 300px;
  background-color: #ddd;
  border-radius: 6px;
  overflow: hidden;
  margin: 30px auto;
  position: relative;
}

/* Ladebalken 1 */
.lade-container-1 {
  height: 20px;
}
.lade-balken-1 {
  height: 100%;
  width: 0%;
  background-color: #FF3344;
  border-radius: 6px 0 0 6px;
  animation: ladeanimation1 4s ease-in-out infinite;
}
@keyframes ladeanimation1 {
  0%   { width: 0%; }
  66%  { width: 100%; }
  83%  { width: 100%; } 
  100% { width: 0%; }   
}

/* Ladebalken 2 */
.lade-container-2 {
  height: 25px;
}
.lade-balken-2 {
  height: 100%;
  background-color: #FF3344;
  border-radius: 6px 0 0 6px;
}
.prozent-text-2 {
  position: absolute;
  width: 100%;
  top: 0;
  text-align: center;
  line-height: 25px;
  font-weight: bold;
  color: #000;
}

/* Kreis 3 */
.kreis-loader-3 {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 40px auto;
}
.kreis-loader-3 svg {
  transform: rotate(-90deg);
  width: 150px;
  height: 150px;
}
.kreis-bg-3 {
  fill: none;
  stroke: #eee;
  stroke-width: 15;
}
.kreis-fortschritt-3 {
  fill: none;
  stroke: #FF3344;
  stroke-width: 15;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 0.1s;
}
.kreis-text-3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  font-size: 22px;
  color: #333;
}

/* Ladebalken 4 */
.stockender-container-4 {
  height: 25px;
}
.stockender-balken-4 {
  height: 100%;
  width: 0%;
  background-color: #FF3344;
  transition: width 0.4s ease-out;
}
.prozent-text-4 {
  position: absolute;
  right: 10px;
  top: 2px;
  font-weight: bold;
  color: #000;
}

            /* ################################ WEITERE LADEELEMENTE ################################ */
            .preset {
                display:flex;
                flex-direction: column;
                -ms-flex-align: center;
                          display:flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;

                gap:2rem;

                margin-top: 1.5rem;
                margin-left: 1rem;
                border: 0;
                padding: 1rem;
                
                background-color:white;
            }
            .loader1 {
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 0 auto;
            width: 3.25rem;
            aspect-ratio: 1;
            border-radius: 50%;
            border: 0.5rem solid #FF3344;
            animation:
                l20-1 1.0s infinite linear alternate,
                l20-2 2.0s infinite linear;
            }
            @keyframes l20-1{
            0%    {clip-path: polygon(50% 50%,0       0,  50%   0%,  50%    0%, 50%    0%, 50%    0%, 50%    0% )}
            12.5% {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100%   0%, 100%   0%, 100%   0% )}
            25%   {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100% 100%, 100% 100%, 100% 100% )}
            50%   {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100% 100%, 50%  100%, 0%   100% )}
            62.5% {clip-path: polygon(50% 50%,100%    0, 100%   0%,  100%   0%, 100% 100%, 50%  100%, 0%   100% )}
            75%   {clip-path: polygon(50% 50%,100% 100%, 100% 100%,  100% 100%, 100% 100%, 50%  100%, 0%   100% )}
            100%  {clip-path: polygon(50% 50%,50%  100%,  50% 100%,   50% 100%,  50% 100%, 50%  100%, 0%   100% )}
            }
            @keyframes l20-2{ 
            0%    {transform:scaleY(1)  rotate(0deg)}
            49.99%{transform:scaleY(1)  rotate(135deg)}
            50%   {transform:scaleY(-1) rotate(0deg)}
            100%  {transform:scaleY(-1) rotate(-135deg)}
            }


            /* HTML: <div class="loader"></div> */
            .loader2 {
            width: 2.5rem;
            height: 2.5rem;
            color: #ff3344;
            background:
                conic-gradient(from  -45deg at top    1.25rem left 50% ,#0000 ,currentColor 1deg 90deg,#0000 91deg),
                conic-gradient(from   45deg at right  1.25rem top  50% ,#0000 ,currentColor 1deg 90deg,#0000 91deg),
                conic-gradient(from  135deg at bottom 1.25rem left 50% ,#0000 ,currentColor 1deg 90deg,#0000 91deg),
                conic-gradient(from -135deg at left   1.25rem top  50% ,#0000 ,currentColor 1deg 90deg,#0000 91deg);
            animation: l4 1.5s infinite cubic-bezier(0.3,1,0,1);
            }
            @keyframes l4 {
            50%  {width:3.75rem;height: 3.75rem;transform: rotate(180deg)}
            100% {transform: rotate(360deg)}
            }

            .loader2container {
                width: 3.75rem;
                height: 3.75rem;
                display: flex;
                justify-content: center;
                align-items: center;
            }

            .loader3 {
            width: 1.25rem;
            aspect-ratio: 1;
            background: #FF3344;
            box-shadow: 0 0 3.75rem 0.9375rem #aa6060;
            position: relative;
            left: 2.5rem;
            clip-path: inset(0);
            animation:
                l4-1 0.5s ease-in-out infinite alternate,
                l4-2 1s   ease-in-out infinite;
            }
            @keyframes l4-1 {
            0% {transform: translateX(-2.5rem)}
            100% {transform: translateX(2.5rem)}
            }
            @keyframes l4-2 {
            33% {clip-path: inset(0 0 0 -6.25rem)}
            50% {clip-path: inset(0 0 0 0)     }
            83% {clip-path: inset(0 -6.25rem 0 0)}
            }

            .loader4 {
            width: fit-content;
            font-size: 2.5rem;
            font-family: system-ui,sans-serif;
            font-weight: bold;
            text-transform: uppercase;
            color: #0000;
            -webkit-text-stroke: 0.0625rem #000;
            background: conic-gradient(#FF3344 0 0) 0/0% 100% no-repeat text;
            animation: l1 1s linear infinite;
            }
            @keyframes l1 {
            to{background-size: 120% 100%}
            }

        .loader5 {
            position: relative;
            width: 6.25rem;
            height: 1rem;
        }
        .loader5:before , .loader5:after{
            content: "";
            position: absolute;
            width: 1rem;
            height: 1rem;
            border-radius: 50%;
            background: #FF3344;
            box-shadow: 2rem 0 #FF3344;
            left: 0;
            top: 0;
            animation: ballMoveX 1s linear infinite;
        }
        .loader5:after {
            box-shadow: none;
            transform-origin: 2.5rem 0;
            transform: rotate(-153deg);
            animation: rotateLoader 1s linear infinite;
        }

        @keyframes rotateLoader {
            0% , 10%{ transform: rotate(-153deg); }
            90%, 100% { transform: rotate(0deg); }
        }
        @keyframes ballMoveX {
            0% , 10%{  transform: translateX(0) }
            90%, 100% { transform: translateX(2rem) }
        }
        .loader6 {
        width: 5.25rem;
        height: 3.25rem;
        --g1:conic-gradient(from  90deg at left   0.2rem top   0.2rem,#ff3344 90deg,#FF3344 0);
        --g2:conic-gradient(from -90deg at bottom 0.2rem right 0.2rem,#ff3344 90deg,#FF3344 0);
        background:var(--g1),var(--g1),var(--g1), var(--g2),var(--g2),var(--g2);
        background-position: left,center,right;
        background-repeat: no-repeat;
        animation: l8 1s infinite;
        }
        @keyframes l8 {
        0%   {background-size:1.5rem 50% ,1.5rem 50% ,1.5rem 50%}
        25%  {background-size:1.5rem 100%,1.5rem 50% ,1.5rem 50%}
        50%  {background-size:1.5rem 50% ,1.5rem 100%,1.5rem 50%}
        75%  {background-size:1.5rem 50% ,1.5rem 50% ,1.5rem 100%}
        100% {background-size:1.5rem 50% ,1.5rem 50% ,1.5rem 50%}
        }
        .loader7 {
        height: 12.5rem;
        aspect-ratio: 1;
        border-bottom: 0.125rem solid #FF3344;
        position: relative;
        overflow: hidden;
        }
        .loader7:before {
        content: "";
        position: absolute;
        inset: auto 42.5% 0;
        aspect-ratio: 1;
        width: 3.75rem;
        height: 3.75rem;
        background-image: url('https://0t1.de/media/site/526e486edf-1693905327/otl.svg'); /* Hier eigenen Pfad zum Logo einfügen */ 
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        animation: 
        l1-0 1.5s cubic-bezier(0,900,1,900) infinite,
        l1-1  3s linear infinite;
        }
        @keyframes l1-0 {
        0%,25% {bottom: 0%}
        98%,to {bottom:.1%}
        }
        @keyframes l1-1 {
        0% {translate: -500%}
        to {translate: 500%}
        }    

        .loader8 {
        width: 8.75rem;
        height: 1.5rem;
        mask:
            radial-gradient(circle closest-side,#000 94%,#0000) 0 0/20% 100%,
            linear-gradient(#000 0 0) center/calc(100% - 0.75rem) calc(100% - 0.75rem) no-repeat;
        background:
        linear-gradient(#FF3344 0 0) 0/0% no-repeat
        #ddd;

        }
        .button {
        font-size: 1.5rem;
        font-family: Verdana, sans-serif;
        color: white;
        background-color: #ff3344;
        height: 3.5rem;
        width: 13.75rem;
        margin: 0.3em;
        border-radius: 2em;
        border: none;
        outline: none;
        cursor: pointer;
        box-shadow: 0 0.5rem 0 #ba2330;
        display: flex;
        justify-content: center;
        align-items: center;
        }
        .button:active {
        box-shadow: none;
        transform: translateY(0.5rem);
        transition: all.1s;
        }
        .button:before {
        content: "Update";
        }
        .loader9 {
    position: relative;
    height: 320px;
  }
  .loader9:after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background-repeat: no-repeat;
    background-image: linear-gradient( 90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100% ), 
        radial-gradient( circle 48px at 48px 48px, #aaaaaa 100%, transparent 0 ), 
        linear-gradient(#aaaaaa 16px, transparent 0), 
        linear-gradient(#aaaaaa 16px, transparent 0), 
        linear-gradient(#aaaaaa 16px, transparent 0), 
        linear-gradient(#aaaaaa 16px, transparent 0), 
        linear-gradient(#aaaaaa 16px, transparent 0), 
        linear-gradient(#aaaaaa 16px, transparent 0), 
        linear-gradient(#aaaaaa 16px, transparent 0), 
      linear-gradient(#e4d8d8 100%, transparent 0);
    background-size: 264px 100%, 96px 96px, 128px 16px, 256px 16px, 496px 16px, 496px 16px, 496px 16px, 496px 16px, 496px 16px, 100% 100%;
    background-position: 0 0 , 16px 16px, 128px 40px, 128px 72px, 16px 128px, 16px 160px, 16px 192px, 16px 224px, 16px 256px, 0 0;
    animation: skeleton-animation 3400ms infinite;
  }
  
  @keyframes skeleton-animation {
    to {
      background-position: 100% 0, 16px 16px, 128px 40px, 128px 72px, 16px 128px, 16px 160px, 16px 192px, 16px 224px, 16px 256px, 0 0;
    }
  }
              
            
!

JS

              
                // Ladebalken 2 (linear)
const balken2 = document.getElementById("balken2");
const text2 = document.getElementById("text2");

function starteBalken2() {
  let wert2 = 0;
  const timer2 = setInterval(() => {
    wert2++;
    if (wert2 > 100) {
      clearInterval(timer2);
      setTimeout(starteBalken2, 1000);
    } else {
      balken2.style.width = wert2 + "%";
      text2.textContent = wert2 + "%";
    }
  }, 40);
}
starteBalken2();

// Kreisfortschritt 3
const kreis3 = document.querySelector('.kreis-fortschritt-3');
const kreisText3 = document.getElementById('kreis-prozent-3');
const umfang3 = 2 * Math.PI * 70;

function starteKreis3() {
  let wert3 = 0;
  const interval3 = setInterval(() => {
    if (wert3 > 100) {
      clearInterval(interval3);
      setTimeout(starteKreis3, 1000);
    } else {
      const offset3 = umfang3 - (wert3 / 100) * umfang3;
      kreis3.style.strokeDashoffset = offset3;
      kreisText3.textContent = wert3 + '%';
      wert3++;
    }
  }, 40);
}
kreis3.style.strokeDasharray = umfang3;
starteKreis3();

// Ladebalken 4 (stockend)
const balken4 = document.getElementById('balken4');
const text4 = document.getElementById('prozent4');

function ladeStockend4() {
  let fortschritt4 = 0;

  function update4() {
    let schritt4 = Math.floor(Math.random() * 15) + 5;
    fortschritt4 += schritt4;
    if (fortschritt4 > 100) fortschritt4 = 100;

    balken4.style.width = fortschritt4 + '%';
    text4.textContent = fortschritt4 + '%';

    if (fortschritt4 < 100) {
      setTimeout(update4, Math.random() * 800 + 200);
    } else {
      setTimeout(() => {
        balken4.style.width = '0%';
        text4.textContent = '0%';
        ladeStockend4();
      }, 1000);
    }
  }

  update4();
}
ladeStockend4();

//Funktionaler Fortschrittsbalken
            document.addEventListener('DOMContentLoaded', function() {
                const button = document.querySelector('.button');
                const progressBar = document.querySelector('.loader8');
                let progressState = 0;
                
                button.addEventListener('click', function() {
                    // Cycle through progress states: 0%, 20%, 40%, 60%, 80%, 100%
                    progressState = (progressState + 1) % 6;
                    const progressPercentage = progressState * 20;
                    
                    // Update the progress bar
                    progressBar.style.backgroundSize = progressPercentage + '%';
                });
            });


              
            
!
999px

Console