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

              
                <head> 
<link href="https://fonts.googleapis.com/css?family=Bitter" rel="stylesheet"> 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> 
<link rel="stylesheet" href="home.css"> 
<meta name="viewport" content="width=device-width"> 
</head> 
<header id="mainNav"> 
<i class="fa fa-bars"></i> 
<ul> <div id="hide"> 
    <i class="fa fa-times"></i> </div>
    <li class = "navigation_item"><a href="home.html">Home</a></li> 
    <li class = "navigation_item"><a href="AboutMe.html">About Me</a></li> 
    <li class = "navigation_item"><a href="Portfolio.html">Portfolio</a></li> 
    <li class = "navigation_item"><a href="Contact.html">Contact</a></li> 
</ul> 
</header> 
<body> 
    <img class="slides" src="https://cdn.shutterstock.com/shutterstock/videos/12616586/thumb/1.jpg"/> 
    <img class="slides" src="https://ak8.picdn.net/shutterstock/videos/7797166/thumb/1.jpg"/> 
    <img class="slides" src="https://ak2.picdn.net/shutterstock/videos/7415047/thumb/1.jpg"/> 
    <div style="text-align:center"> <span class="dot"></span> <span class="dot"></span> <span class="dot">
        </span> 
    </div> 
    <div id= "copyright">
        <h3>&copy; Matheus Duarte 2017</h3>
    </div> 
    <h1>Matheus Duarte</h1> 
    <h2>Aspiring Web Developer</h2> 
    
<script src="home.js"></script> 
    <script> 
        var slideIndex = 0; showSlides(); function showSlides() { var i;  
        var slides = document.getElementsByClassName("slides"); var dots = document.getElementsByClassName("dot"); 
            for (i = 0; i < slides.length; i++) slides[i].style.display = "none"; 
            slideIndex++; 
            if (slideIndex > slides.length) {slideIndex = 1} 
            for (i = 0; i < dots.length; i++) 
            { dots[i].className = dots[i].className.replace("active", ""); } 
                                                                 
            slides[slideIndex-1].style.display = "block"; dots[slideIndex-1].className += " active"; setTimeout(showSlides, 9000); } 
    </script> 
    </body> 
              
            
!

CSS

              
                html>body {
    margin-right: 40%;
    padding: 0px;
}

.slides {
    background-image: image("https://cdn.shutterstock.com/shutterstock/videos/12616586/thumb/1.jpg"), image("https://ak8.picdn.net/shutterstock/videos/7797166/thumb/1.jpg"),
    image("https://ak2.picdn.net/shutterstock/videos/7415047/thumb/1.jpg");
    background-size: cover;
    position: absolute;
    height: 100%;
    width: 100%;
    margin-bottom: 0px;
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 0px;
    z-index:-1;
  }

.dot {
  position: relative;
  top: 600px;
  right: -250px;    
  height: 13px;
  width: 13px;
  margin: 0 2px;
  background-color: black;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}    
    
.active {
  background-color: #717171;
}        

h1 {
    position: relative;
    top: 295px;
    right: -10%;
    color: white;
    font-size: 2em;
}

h2 {
    position: relative;
    top: 300px;
    right: -10%;
    color: white;
    font-size: 1.2em;  
    border-bottom: 1px solid white;
    width: 203px;
}

.fa-bars {
        position: fixed;
        text-align: center;
        padding: 2px;
        top: 20px;
        left: 85%;
        width: 40px;
        height: 40px;
        font-size: 2.5em;
        background-color: rgba(0, 0, 0, 0.5);
	list-style-type: none;
        color: white;
        cursor: pointer;
    }    
    
    
#mainNav {
        display: inline-block;
        width: 500px;
        list-style-type: none;
        color: white;
        background-color: rgba(0, 0, 0, 0.5);
        position: fixed;
        top: 95px;
        left: 56%;
        height: 15vh;
        overflow: hidden;
        transition: all ease-in-out 200ms;
    }
    
#hide {
        position: relative;
        left: 85%;
        color: red;
        opacity: 0.3;
        cursor: pointer;
    }     
    
#hide:hover {
        color: red;
        opacity: 1;
    }
    
.navigation_item {
    float: left;
    width: 25%;
    position: relative;
    top: 10px;
    right: 30px;
    list-style-type: none;
    font-family: 'Open-Sans';
	font-weight: 200;
	padding-top: 0px;
	box-sizing: border-box;
	font-size: 25px;
	text-align: center;
	transition: all 0.3s ease-in-out;
	cursor: pointer;
}


.navigation_item:hover {
  background-color: rgb(255, 0, 0);
  transition: all 0.3s ease-in-out;
}

a {
    color: white;
}

#copyright {
    position: relative;
    right: -70%;
    top: 600px;
    color: white;
}   

/*==============================================================================*/
/*Media Queries*/
@media screen and (max-device-width:738px){
html {
	margin: 0;
	padding: 0;
      }

.slides {
	background-size:cover;
	height:150%;
	width:140%;
	margin: 0;
	padding:0;
        z-index: -99;
     }

body {
	background-size: cover;
	background-repeat:no-repeat;
	height: 100%;
	width: 100%;
     }

.fa-bars {
	position: fixed;
        text-align: center;
        padding: 2px;
        top: 20px;
        left: 80%;
        width: 40px;
        height: 40px;
        font-size: 2em;
        background-color: rgba(0, 0, 0, 0.5);
	list-style-type: none;
        color: blue;
        z-index: 99;
     }

#mainNav {   
        top: 70px;
        left: 25%;
        height: 7vh;
        overflow: hidden;
        transition: all ease-in-out 200ms;
     }

.navigation_item {
        float: left;
        width: 19%;
        position: relative;
        top: -19px;
        right: 35px;
        list-style-type: none;
        font-family: 'Open-Sans';
	font-weight: 200;
	padding-top: 0px;
	box-sizing: border-box;
	font-size: 15px;
	text-align: center;
	transition: all 0.3s ease-in-out;
	cursor: pointer;
     }

#hide {
        position: relative;
        top: -15px;
        left: 75%;
        color: red;
        opacity: 0.3;
        cursor: pointer;
      }  

 
h2 {
    font-size: 1em;
    border-bottom: 1px solid white;
    width: 170px;
  }

.dot {
      position:relative;
      right: -80px;
    }
	
#copyright {
	position: relative;
	right: -41%;
      }
    }
              
            
!

JS

              
                function showNav() {
    var show = true;
    if (show == true) {
    document.getElementById("mainNav").style.width = "500px";
  }  
}
    
function hideNav() {
    var hide = true;
    if (hide == true) {
        document.getElementById("mainNav").style.width = "0";
    }
} 
mainNav.addEventListener("click", showNav, true);
hide.addEventListener("click", hideNav);
showNav();
hideNav();
              
            
!
999px

Console