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. 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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens. You can view all of your templates, or learn more in the documentation.

Screenshot

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                <nav>
        <h3><a href="#">Start Bootstrap</a></h3>
        <ul>
            <li><a href="#">Services</a></li>
            <li><a href="#">Portfolio</a></li>
            <li><a href="#">About</a></li>
            <li><a href="#">Team</a></li>
            <li><a href="#">Contact</a></li>
        </ul>
    </nav>



    <!-- Masthead -->

    <header class="masthead d-flex">
        <div class="container text-center my-auto">
            <h1 class="mb-1 type-it bounceInDown animated"></h1>
            <p class="lead maintxt bounceInDown animated">I am a Front End developer based in the UK. If you are a business seeking a web presence or an employer looking to hire, you can get in touch with me <a href="#contact" class="txtlink2 js-scroll-trigger" target="_blank">here</a>.</p>
            <hr class="home bounceInDown animated">
            <a class="btn btn-primary btn-xl rounded js-scroll-trigger bounceInDown animated" href="#features-icons">Find Out More <i class="fa fa-chevron-down" aria-hidden="true"></i></a>
        </div>
    </header>

    <!-- Icons Grid -->
    <section class="features-icons bg-light text-center" id="features-icons">
        <div class="container">
            <h2 class="mb-5">What You Can Expect</h2>
            <hr class="black">
            <div class="row">
                <div class="col-lg-4">
                    <div class="features-icons-item mx-auto mb-5 mb-lg-0 mb-lg-3">
                        <div class="features-icons-icon d-flex">
                            <i class="fas fa-desktop m-auto text-primary"></i>
                        </div>
                        <h3>Fully Responsive</h3>
                        <p class="lead mb-0">This theme will look great on any device, no matter the size!</p>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="features-icons-item mx-auto mb-5 mb-lg-0 mb-lg-3">
                        <div class="features-icons-icon d-flex">
                            <i class="fas fa-desktop m-auto text-primary"></i>
                        </div>
                        <h3>Bootstrap 4 Ready</h3>
                        <p class="lead mb-0">Featuring the latest build of the new Bootstrap 4 framework!</p>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="features-icons-item mx-auto mb-0 mb-lg-3">
                        <div class="features-icons-icon d-flex">
                            <i class="fas fa-desktop m-auto text-primary"></i>
                        </div>
                        <h3>Easy to Use</h3>
                        <p class="lead mb-0">Ready to use with your own content, or customize the source files!</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Testimonials -->
    <section class="testimonials text-center bg-light">
        <div class="container">
            <h2 class="mb-5">What people are saying...</h2>
            <hr class="black">
            <div class="row">
                <div class="col-lg-4">
                    <div class="testimonial-item mx-auto mb-5 mb-lg-0">
                        <img class="img-fluid rounded-circle mb-3" src="images/testimonials-1.jpg" alt="">
                        <h5>Margaret E.</h5>
                        <p class="font-weight-light mb-0">"This is fantastic! Thanks so much guys!"</p>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="testimonial-item mx-auto mb-5 mb-lg-0">
                        <img class="img-fluid rounded-circle mb-3" src="images/testimonials-2.jpg" alt="">
                        <h5>Fred S.</h5>
                        <p class="font-weight-light mb-0">"Bootstrap is amazing. I've been using it to create lots of super nice landing pages."</p>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="testimonial-item mx-auto mb-5 mb-lg-0">
                        <img class="img-fluid rounded-circle mb-3" src="images/testimonials-3.jpg" alt="">
                        <h5>Sarah W.</h5>
                        <p class="font-weight-light mb-0">"Thanks so much for making these free resources available to us!"</p>
                    </div>
                </div>
            </div>
        </div>
    </section>



    <!-- Footer -->
    <footer class="py-5 bg-dark">
        <div class="container">
            <p class="m-0 text-center text-white">Copyright &copy; Your Website 2018</p>
        </div>
        <!-- /.container -->
    </footer>
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Kaushan+Script|Montserrat');
html {
  height: 1200px;
  font-size: 16px;
}

body {
  height: 100%;
  background: url("https://blackrockdigital.github.io/startbootstrap-agency/img/header-bg.jpg") no-repeat center top / cover;
}

body * {
  /* border: 1px solid; */
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1rem 0;
  width: 100%;
  transition: background-color 100ms linear;
}

nav * {
  margin: 0;
  padding: 0;
}

nav h3 {
  flex: 1;
  text-align: center;
}

nav h3 a {
  display: inline-block;
  /* margin-left: 0.33rem; */
  color: #fed136;
  font-family: 'Kaushan Script', Helvetica, Arial, cursive;
  font-size: 1.75rem;
  text-decoration: none;
  transition: font-size 200ms linear;
}

nav ul {
  flex: 1;
  display: flex;
  justify-content: center;
}

nav ul li {
  display: inline-block;
  margin: 0.5rem;
}

nav ul li:last-child {
  margin-right: 4rem;
}

nav ul li a {
  color: white;
  font-family: Montserrat, Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  text-decoration: none;
  text-transform: uppercase;
}

nav ul li a:hover {
  color: #fed136;
}

.scrolled-nav {
  background-color: #212529;
}

.scrolled-nav h3 a {
  font-size: 1rem;
}



h1 {
    font-weight: 700;
    text-transform: uppercase;
}

h2,
{
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: .5rem
}

p {
    margin-top: 0;
    margin-bottom: 1rem
}

.masthead {
    color: #fff;
    min-height: 30rem;
    width: 100%;
    height: auto;
    padding-top: 8rem;
    padding-bottom: 8rem;
    background: url(../images/header.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.masthead h1 {
    font-size: 3rem;
    margin: 0;
    padding: 0
}

@media (min-width:992px) {
    .masthead {
        height: 100vh
    }
    .masthead h1 {
        font-size: 3.5rem
    }
}

.features-icons {
    padding-top: 7rem;
    padding-bottom: 7rem;
}

.features-icons .features-icons-item {
    max-width: 20rem
}

.features-icons .features-icons-item .features-icons-icon {
    height: 7rem
}

.features-icons .features-icons-item .features-icons-icon i {
    font-size: 4.5rem
}

.features-icons .features-icons-item:hover .features-icons-icon i {
    font-size: 5rem
}

.testimonials {
    padding-top: 7rem;
    padding-bottom: 7rem
}

.testimonials .testimonial-item {
    max-width: 18rem
}

.testimonials .testimonial-item img {
    max-width: 12rem;
    box-shadow: 0 5px 5px 0 #adb5bd
}

footer.footer {
    padding-top: 4rem;
    padding-bottom: 4rem
}

.mt-4,
.my-4 {
    margin-top: 1.5rem !important
}

hr.black {
    border-color: black;
    max-width: 3.125rem;
    border-width: 0.2rem;
}

hr.white {
    border-color: white;
    max-width: 3.125rem;
    border-width: 0.2rem;
}

hr.home {
    border-color: white;
    max-width: 9rem;
    border-width: 0.2rem;
}

.txtlink2 {
    color: #fff;
    font-weight: bold;
}

.txtlink2:hover {
    color: #fff;
    text-decoration: underline;
}


/*Extra small devices (portrait phones, less than 576px) // No media query since this is the default in Bootstrap
Small devices (landscape phones, 576px and up)*/

@media (min-width: 576px) {
    .maintxt {
        max-width: ;
    }
}


/* Medium devices (tablets, 768px and up)*/

@media (min-width: 768px) {
    .maintxt {
        max-width: ;
    }
}


/* Large devices (desktops, 992px and up)*/

@media (min-width: 992px) {
    .maintxt {
        max-width: ;
    }
}


/* Extra large devices (large desktops, 1200px and up)*/

@media (min-width: 1200px) {
    .maintxt {
        max-width: ;
    }
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem 0;
    width: 100%;
    transition: background-color 100ms linear;
}

nav * {
    margin: 0;
    padding: 0;
}

nav h3 {
    flex: 1;
    text-align: center;
}

nav h3 a {
    display: inline-block;
    /* margin-left: 0.33rem; */
    color: #fed136;
    font-family: 'Kaushan Script', Helvetica, Arial, cursive;
    font-size: 1.75rem;
    text-decoration: none;
    transition: font-size 200ms linear;
}

nav ul {
    flex: 1;
    display: flex;
    justify-content: center;
}

nav ul li {
    display: inline-block;
    margin: 0.5rem;
}

nav ul li:last-child {
    margin-right: 4rem;
}

nav ul li a {
    color: white;
    font-family: Montserrat, Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    text-decoration: none;
    text-transform: uppercase;
}

nav ul li a:hover {
    color: #fed136;
}

.scrolled-nav {
    background-color: #212529;
}

.scrolled-nav h3 a {
    font-size: 1rem;
}
              
            
!

JS

              
                jQuery(document).ready(function($) {
    $('.type-it').typeIt({
        content: 'Hi, my name is Liam Docherty'
    });
});

const nav = document.querySelector('nav');

window.addEventListener('scroll', () => {
    const scrollY = window.scrollY;

    if (scrollY < 100) {
        nav.classList.remove('scrolled-nav');
    } else if (scrollY >= 100 && scrollY < 200) {
        nav.classList.add('scrolled-nav');
    }
});
              
            
!
999px
Keep the <main> thing the <main> thing.

Console