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

              
                <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="styles.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <title>Smooth Scroll in CSS</title>
</head>
<body>
    <!-- Navigation Menu -->
    <nav>
        <a href="https://www.lambdatest.com/">
            <div class="logo-container">
                <img src="https://www.lambdatest.com/resources/images/logos/logo.svg" alt="Logo">
            </div>
        </a>

        <div class="menu-bar">
            <i class="fa fa-bars fa-2x" style="color: black;"></i>
        </div>

        <div class="nav-links">
            <a href="#about">About</a>
            <a href="#browser-testing">Browser Testing</a>
            <a href="#real-device-testing">Real Device Testing</a>
        </div>

        <div class="nav-buttons">
            <button class="upgrade">Upgrade</button>
            <button class="book-a-demo">Book a Demo</button>
        </div>
    </nav>

    <!-- Automation Section -->
    <section id="real-device-testing" class="automation-section">
        <div class="automation-text-container">
            <h2>Online Selenium Test Automation on Desktop, Android, and iOS Mobile Browsers</h2>

            <p>Run your Selenium test automation scripts across online Selenium Grid of desktop, Android and iOS mobile browsers. Develop, test, and deliver faster every time with automated cross browser testing using LambdaTest online Automation Browser Testing Grid.</p>

            <button>Get Started <i class="fa fa-arrow-right"></i></button>
        </div>

        <div class="automation-image-container">
            <img src="https://www.lambdatest.com/resources/images/selenium-parallel-testing-index.png" alt="Automation">
        </div>
    </section>

    <!-- About Section 2 -->
    <section id="about" class="about-section">
        <div class="about-text-section">
            <h2>More Reasons To Love LambdaTest</h2>
            <p>Along with 3000+ browsers and devices combinations to test we provide you additional features to make sure you give your users a perfect experience.</p>
        </div>

        <div class="grid">
            <div class="grid-card">
                <div class="card-image-container">
                    <img src="https://www.lambdatest.com/resources/images/headset.svg" alt="headset">
                </div>

                <div class="card-text-container">
                    <h3>24/7 Support</h3>
                    <p>Got a question? Throw them to our in-app customer chat support or email us on support@lambdatest.com</p>
                </div>
            </div>

            <div class="grid-card">
                <div class="card-image-container">
                    <img src="https://www.lambdatest.com/resources/images/Integration-logo.svg" alt="Integration">
                </div>

                <div class="card-text-container">
                    <h3>Third-Party Integrations</h3>
                    <p>With a single click, push bugs in your choice of project management tools, directly from LambdaTest platform.</p>
                </div>
            </div>

            <div class="grid-card">
                <div class="card-image-container">
                    <img src="https://www.lambdatest.com/resources/images/header/LambdaTest-Documentation.svg" alt="Documentation">
                </div>

                <div class="card-text-container">
                    <h3>24/7 Support</h3>
                    <p>Step-by-step documention for various test automation frameworks to help you run your first Selenium script.</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Testing -->
    <section id="browser-testing" class="testing-section">
        <div class="testing-text-container">
            <h2>Real Device Cloud for Reliable Mobile App Testing</h2>

            <p>Test your native hybrid of web mobile apps using LambdaTest’s online real device cloud and virtual mobile device platform of emulators and simulators. Eliminating your in-house device labs and bring high scalability to your mobile app testing.</p>

            <button>See More <i class="fa fa-arrow-right"></i></button>
        </div>

        <div class="testing-image-container">
            <img src="https://www.lambdatest.com/resources/images/mobile-app-testing.png" alt="Mobile App Testing">
        </div>
    </section>
</body>
</html>
              
            
!

CSS

              
                * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: sans-serif;
    padding-top: 80px;
    height: 100vh;
    /* max-width: 1400px;
    margin: 0 auto; */
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    box-shadow: 0 0 4px #f5f5f5;
    padding: 20px 50px;
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 10;
}
.menu-bar {
    display: none;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}
a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-size: 16px;
}


.nav-buttons {
    display: flex;
    gap: 30px;
}
.upgrade {
    padding: 10px 15px;
    border: 1px solid black;
    border-radius: 0.25rem;
    cursor: pointer;
    background-color: #fff;
    color: black;
}
.book-a-demo {
    padding: 12px 15px;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(91.88deg,#2c57f3 .88%,#a506d8 98.71%);
}

@media only screen and (max-width: 768px) {
    body {
        height: auto;
    }

    nav {
        display: flex;
        padding: 30px 20px;
    }
    .logo-container img {
        height: 40px;
    }
    .menu-bar {
        display: block;
        cursor: pointer;
    }

    .nav-links {
        display: none;
    }

    .nav-buttons {
        display: none;
    }
}


/* AUTOMATION SECTION */
.automation-section {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    background-color: rgba(242,242,242);
    padding: 50px;
}
.automation-text-container {
    width: 60%;
    padding-top: 20px;
    height: 100%;
}

.automation-text-container h2 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 25px;
}

.automation-text-container p {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 30px;
}

.automation-text-container button {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    color: rgba(14,186,197);
    font-weight: 600;
    border: none;
    background: none;
}

.automation-image-container {
    width: 100%;
    display: flex;
}

.automation-image-container img {
    max-width: 100%;
    height: auto;
}


@media only screen and (max-width: 992px) {
    .automation-image-container {
        display: none;
    }

    .automation-text-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
        width: 100%;
        padding-top: 20px;
        height: 100%;
    }

    .automation-text-container h2, .automation-text-container p {
        text-align: center;
    }

    .automation-text-container button {
        font-size: 20px;
        color: rgba(14,186,197);
        font-weight: 600;
        border: none;
        background: none;
    }
}



/* ABOUT SECTION */
.about-section {
    background-color: rgb(238,245,255);
    padding: 80px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-text-section {
    max-width: 80%;
}

.about-text-section h2 {
    margin-bottom: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 40px;
}
.about-text-section p {
    text-align: center;
    font-size: 18px;
    font-weight: 400;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 15px;
    margin-top: 50px;
    max-width: 80%;
}

.grid-card {
    text-align: center;
    padding: 30px;
    background-color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transform: translateY(0);
    transition: .5s;
}
.grid-card:hover {
    transform: translateY(-15px);
}

.card-image-container {
    width: 100px;
    margin: 0 auto;
    margin-bottom: 55px;
}

.card-image-container img {
    max-width: 100%;
    height: auto;
}
.card-text-container h3 {
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 600;
}
.card-text-container p {
    font-size: 16px;
}

@media only screen and (max-width: 992px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 20px;
    }
}

@media only screen and (max-width: 768px) {
    .about-section {
        padding: 80px 20px;
    }
    .grid {
        grid-template-columns: 1fr;
    }
}


/* Testing */
.testing-section {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 30px;
    background-color: #fff;
    padding: 50px;
}
.testing-text-container {
    width: 60%;
    padding-top: 20px;
    height: 100%;
}

.testing-text-container h2 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 25px;
}

.testing-text-container p {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 30px;
}

.testing-text-container button {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    color: rgba(14,186,197);
    font-weight: 600;
    border: none;
    background: none;
}

.testing-image-container {
    width: 100%;
    display: flex;
}
.testing-image-container img {
    max-width: 100%;
    height: auto;
}

@media only screen and (max-width: 992px) {
    .testing-image-container {
        display: none;
    }

    .testing-text-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
        width: 100%;
        padding-top: 20px;
        height: 100%;
    }

    .testing-text-container h2, .testing-text-container p {
        text-align: center;
    }

    .testing-text-container button {
        font-size: 20px;
        color: rgba(14,186,197);
        font-weight: 600;
        border: none;
        background: none;
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console