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.


                      <section id="abc">
         <div class="progressbarWrapper">
            <span id="greenBar"></span>


                body {
  height: 3000px;

#abc {

.progressbarWrapper {
	height: 30px;
  width: 500px;
  display: block;
  margin: auto;
  margin-top: 20vh;
	position: relative;
	background: #555;
	padding: 3px;
	box-shadow: inset 0 -1px 1px rgba(255,255,255,0.3);

#greenBar {
  display: block;
  height: 100%;
  width: 0px;
  background-color: rgb(43,194,83);
  background-image: linear-gradient(
    center bottom,
    rgb(43,194,83) 37%,
    rgb(84,240,84) 69%
    inset 0 2px 9px  rgba(255,255,255,0.3),
    inset 0 -2px 6px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
  font-size: 15px;
  text-align: center;


                // ждем полной загрузки страницы
window.onload = () => {
    // устанавливаем настройки
    const options = {
        // родитель целевого элемента - область просмотра
        root: null,
        // без отступов
        rootMargin: '0px',
        // процент пересечения
        threshold: 1

    // создаем наблюдатель
    const observer = new IntersectionObserver((entries, observer) => {
        // для каждой записи-целевого элемента
        entries.forEach(entry => {
            // если элемент является наблюдаемым
            if (entry.isIntersecting) {
                const tagTarget =;
                //запускаем прогрессбар
                // прекращаем наблюдение
    }, options)

    // с помощью цикла следим за всеми элементами с классом "progressbarWrapper" на странице
    const arr = document.querySelectorAll('.progressbarWrapper')
    arr.forEach(i => {

function move() {

    let elem = document.getElementById("greenBar");
    let stepValue = 0;
    let id = setInterval(frame, 500);

    function frame() {

        if (stepValue >= 100) {

        } else {
   = (stepValue + 10) + "%";
            elem.innerHTML = (stepValue + 10) + "%";
            stepValue = (stepValue + 10);