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

              
                <!DOCTYPE html>
 <html>
  <head>
	<title>Project Name | Page # &/ Name</title>
	 <link rel="stylesheet" type="text/css" href="../CSS/stylesheet.css"/>
	  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
       <script defer src="https://use.fontawesome.com/releases/v5.7.1/js/all.js" integrity="sha384-eVEQC9zshBn0rFj4+TU78eNA19HMNigMviK/PU/FFjLXqa/GKPgX58rvt5Z8PLs7" crossorigin="anonymous"></script>
	    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TweenMax.min.js"></script>
	     <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TimelineMax.min.js"></script>
	      <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/plugins/CSSRulePlugin.min.js"></script>
		   <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/plugins/CSSPlugin.min.js"></script>
		    <script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
		    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	</head>
	 <body>
	  <!-- A section defining a flexible box to contain all elements of the body inside for dynamic sizing of browser and site -->
		<section class="body_cont">
			<header class="main_hd">
				<h1 class="brand_name">Company Name</h1>
				 <!-- Optional placement for Company/Brand Logo -->
				  <!-- <img src="../Images/logo_name.jpg" class="main_logo"/> -->
			 </header>
			<!-- Main Navigation panel with optional animations such as dropdown, hover transitions, shines, etc. further sub-navigations will be further down -->
			<nav class="main_nav">
			 <!-- Active class allows user to know that the Home Page is the current or active site being displayed in the browser. 
				  The "#" in the link place will be replaced with site links of any multi-page project.
				  Universal Class of nav_link used to individual place links together.
				  Links 1-x is to have specific attributes to link beside the active attributes.
				 -->
				<a href="#" class="active nav_link link_1">Home</a>
				 <a href="#" class="nav_link link_2">About</a>
				  <a href=#" class="nav_link link_3">Contact</a>
				   <a href="#" class="nav_link link_4" id="dropdown_trigger">Products</a>
			 </nav>
			<!-- Optional Sub/Dropdown Nav -->
			<div class="triangle"> </div>
			<div class="dropdown_cont">
			 
				<nav class="sub_nav" id="dropdown_content">
					<a href="#" class="dropdown_link sndlink_1">Item 1</a> <br>
					 <a href="#" class="dropdown_link sndlink_2">Item 2</a> <br>
					  <a href="#" class="dropdown_link sndlink_3">Item 3</a> <br>
					   <a href="#" class="dropdown_link sndlink_4">Item 4</a> <br>
				 </nav>
			 </div>
		 </section>
		<script src="../JavaScript/main.js"></script>
	  </body>
              
            
!

CSS

              
                body {
	background-color: white; /*black*/ /*rgba(0, 0, 0, .5)*/ /*#000*/ /*#000000*/
	font-family: Verdana, Arial, Sans-serif;
	color: black; /*#000*/ /*#000000*/ /*red*/
	margin: 0;
	padding: 0;
}
a {
	text-decoration: none;
	color: black;
}
.triangle {
	max-width: 0;
	width: 0vw;
	max-height: 0vw;
	height: 0vw;
	position: absolute;
	top: 4vw;
	left: 12.75vw;
	border-bottom: .45vw solid #2f4f4f;
	border-left: .45vw solid transparent;
	border-right: .45vw solid transparent;
	border-top: .15vw solid transparent;
	opacity: 1;
	transform: rotate(180deg);
}
.dropdown_cont {
	position: absolute;
	left: 9.5vw;
	top: 7vw;
	background-color: #f3f3f3;
	max-width: 10vw;
	width: 10vw;
	max-height: 8vw;
	height: 8vw;
	opacity: 0;
	pointer-events: none;
}
.dropdown_link, .sndlink_1 {
	position: absolute;
	left: 1vw;
	top: 1vw;
	opacity: 0;
}
.sndlink_2 {top: 2.5vw;}
.sndlink_3 {top: 4vw;}
.sndlink_4 {top: 5.5vw;}
              
            
!

JS

              
                $(document).ready(function() {
	var timeLine = new TimelineMax();
	var tl = new TimelineMax();
	$('#dropdown_trigger').mouseenter(function() {
		tl.to('.dropdown_cont', 1, {y: "-2vw", opacity: 1});
		tl.staggerTo('.dropdown_link', .5, {x: "1vw", opacity: 1}, .25, "-=.5");
		 if(tl.isActive(true)) {
			 tl.killAll();
		 }
	 });
	 
	$('#dropdown_trigger').mouseleave(function() {
		timeLine.staggerTo('.dropdown_link', .5, {x: "-1vw", opacity: 0}, .25);
		timeLine.to('.dropdown_cont', 1, {y: "2vw", opacity: 0}, "-=1");
	 });
	console.log("Animation Successful, Bug Free ");
	
});
              
            
!
999px

Console