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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <!-- الدرس: https://bit.ly/3a0JNEo -->
<div class="general">
    <header>
        <h1>زر الصعود للأعلي</h1>
        <span>زر الصعود إلى الأعلى بدون JQuery</span>
    </header>
    <main>
        <div class="container">
            <div class="template">
                <div class="template-blog">
                    <div class="template-widget">
                        <h2 class="template-widget__title">مثال علي مقال</h2>
                        <div class="template-widget__content">
                            <div class="example-text">
                                <span class="text-item"></span>
                                <span class="text-item"></span>
                                <span class="text-item"></span>
                            </div>
                            <div class="example-image far fa-image"></div>
                            <div class="example-text">
                                <span class="text-item"></span>
                                <span class="text-item"></span>
                                <span class="text-item"></span>
                                <span class="text-item"></span>
                                <span class="text-item"></span>
                            </div>
                            <div class="example-grid flex wrap align-items-start">
                                <div class="example-grid__item far fa-image"></div>
                                <div class="example-grid__item far fa-image"></div>
                                <div class="example-grid__item far fa-image"></div>
                            </div>
                            <div class="example-text row">
                                <div class="col-6-md">
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                </div>
                                <div class="col-6-md">
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                </div>
                            </div>
                            <div class="example-image far fa-image"></div>
                            <div class="example-grid flex wrap align-items-start">
                                <div class="example-grid__item far fa-image"></div>
                                <div class="example-grid__item far fa-image"></div>
                                <div class="example-grid__item far fa-image"></div>
                            </div>
                            <div class="example-text row">
                                <div class="col-4-lg col-6-md">
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                </div>
                                <div class="col-4-lg col-6-md">
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                </div>
                                <div class="col-4-lg col-6-md">
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                    <span class="text-item"></span>
                                </div>
                            </div>
                            <div class="example-grid flex wrap align-items-start">
                                <div class="example-grid__item far fa-image"></div>
                                <div class="example-grid__item far fa-image"></div>
                                <div class="example-grid__item far fa-image"></div>
                                <div class="example-grid__item far fa-image"></div>
                                <div class="example-grid__item far fa-image"></div>
                                <div class="example-grid__item far fa-image"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="template-sidebar">
                    <div class="template-widget">
                        <h2 class="template-widget__title">مثال علي أداة</h2>
                        <div class="template-widget__content">
                            <div class="example-grid__item far fa-image"></div>
                            <div class="example-grid__item far fa-image"></div>
                            <div class="example-grid__item far fa-image"></div>
                        </div>
                    </div>
                </div>
            </div>
    </main>
    <footer>
        <a href="https://www.imintweb.com" target="_blank">طور <i class="fas fa-code"></i> بـ <i class="fas fa-heart"></i> بواسطة <span class="by">مينت ويب</span></a>
    </footer>
</div>
<!-- ScrollToTop -->
<button id="scrollToTop" class="scrollToTop">
    <svg xmlns="http://www.w3.org/2000/svg" width="35" height="35" viewBox="0 0 24 24">
        <path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" />
        <path d="M0 0h24v24H0z" fill="none" />
    </svg>
</button>
              
            
!

CSS

              
                .scrollToTop {
    outline: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
}
.scrollToTop svg {
    display: block;
}
.scrollToTop {
    position: fixed;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, background 0.3s, -webkit-transform 0.3s;
    transition: transform 0.3s, opacity 0.3s, background 0.3s;
    transition: transform 0.3s, opacity 0.3s, background 0.3s,
        -webkit-transform 0.3s;
    -webkit-transform: translateY(-2em);
    transform: translateY(-2em);
}
.scrollToTop.visible {
    pointer-events: all;
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
}
/*}} Fin del core {{*/

/*! Personalización */
/* Icono
-----------------------------------------*/
.scrollToTop svg {
    fill: #ffffff; /* color */
}
/* Boton
-----------------------------------------*/
.scrollToTop {
    background-color: #252525; /* fondo */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); /* sombra */
    bottom: 1em; /* separación inferior */
    right: 1em; /* separación derecha */
    padding: 0.5em; /* relleno */
    border-radius: 4px; /* borde redondeado */
}
.scrollToTop:hover {
    background-color: #020202; /* fondo (hover) */
}

              
            
!

JS

              
                /*!
 * ScrollToTop v2.0.0
 * Copyright 2019 zkreations
 * Daniel Abel M. (fb.com/danieI.abel)
 * Licensed under MIT (github.com/zkreations/plugins/blob/master/LICENSE)
 */
var scrollToTop = (function () {
    var scrollButton = document.getElementById("scrollToTop");
    (showButton = scrollButton.dataset.upshow || 600),
        (scrollSpeed = scrollButton.dataset.upspeed || 1000);
    function scrollTop(b) {
        function a(d) {
            c += Math.PI / (b / (d - e));
            c >= Math.PI && window.scrollTo(0, 0);
            0 !== window.scrollY &&
                (window.scrollTo(
                    0,
                    Math.round(scrollTime + scrollTime * Math.cos(c))
                ),
                (e = d),
                window.requestAnimationFrame(a));
        }
        var scrollTime = window.scrollY / 2,
            c = 0,
            e = performance.now();
        window.requestAnimationFrame(a);
    }
    var scrollPosition = window.scrollY;
    window.addEventListener("scroll", function () {
        scrollPosition = window.scrollY;
        showButton < scrollPosition
            ? scrollButton.classList.add("visible")
            : scrollButton.classList.remove("visible");
    });
    scrollButton.onclick = function () {
        scrollTop(scrollSpeed);
    };
})();

              
            
!
999px

Console