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

              
                <nav class="nav-menu-mob">
		
		<div class="nav-wrapper">
      		<div class="logo">
      			<span><a href="#">logo</a></span>
    		</div>

    		<ul class="mob-links">
    			<li>Hello there!</li>
    			<li>Hello there!</li>
    			<li>Hello there!</li>
    			<li>Hello there!</li>
    			
    			<div class="nav-button">
	      			<div class="nav-button-wrapper-inner">
	        			<button class="button">Contact Us</button>
	      			</div>
    			</div>
    		</ul>

    		

    		<div class="hamburger">
                <svg class="ham hamRotate ham4" viewBox="0 0 100 100" width="50" onclick="this.classList.toggle('active')">
                  <path
                        class="line top"
                        d="m 70,33 h -40 c 0,0 -8.5,-0.149796 -8.5,8.5 0,8.649796 8.5,8.5 8.5,8.5 h 20 v -20" />
                  <path
                        class="line middle"
                        d="m 70,50 h -40" />
                  <path
                        class="line bottom"
                        d="m 30,67 h 40 c 0,0 8.5,0.149796 8.5,-8.5 0,-8.649796 -8.5,-8.5 -8.5,-8.5 h -20 v 20" />
                </svg>
            </div>
    	</div>

	</nav>

              
            
!

CSS

              
                *{
	margin: 0;	
	padding: 0;	
}

body{
	background-color: #F1F2F7 !important;
	font-family: 'Quicksand' !important;
	overflow-x: hidden;
}

body::-webkit-scrollbar {
  width: 10px;
  /*background-color: #f9f9fd;*/
}

body::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: #121A21;
}

body::-webkit-scrollbar-track {
  /*-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.2);*/
  /*border-radius: 10px;*/
  background-color: transparent;
}

h2{
	font-family: 'Raleway';
	color: #181D4E;
}

.header-text{
	text-align: center;
	padding: 90px 0 50px 0;
	font-family: 'Raleway';
	color: #181D4E;
	font-size: 48px;
	font-weight: 700;
}

.button{
  white-space: nowrap;
	border: none;
	cursor: pointer;
	padding: 15px 40px;
	border-radius: 15px;
	color: #fff;
	font-weight: 600;
	/*text-transform: uppercase;*/
	letter-spacing: 3px;
	font-size: 18px;

	background: linear-gradient(273.22deg, #2FE6E6 0%, #078989 100%);
}

.space{
	height: 90px;
}

/*Menu*/

nav{
  background: #121A21;
  padding: 15px 0;
  position: absolute;
  width: 100%;
  z-index: 1000;
}

.nav-wrapper{
  display: flex;
  justify-content: space-between;
  padding: 0 30px;
}

nav a{
  text-decoration: none;
  color: #fff;
}

nav .logo{
  line-height: 50px;
  font-size: 40px;
  font-weight: 900;
  font-family: 'Ubuntu', sans-serif;
  z-index: 1;
}

nav .nav-links{
  position: relative;
}

nav .nav-links ul{
  margin: 0 !important;
}

nav .nav-links ul li{
  height: 100%;
  vertical-align: middle;
  color: #fff;
  display: inline-block;
  margin: 0px 1.5rem;
  font-size: 16px;
  line-height: 50px;
  cursor: pointer;
  font-weight: 300;
}
nav .nav-button{
  display: table;
  text-align: center;
}

nav .nav-button-wrapper-inner{
  vertical-align: middle;
  display: table-cell;
}

nav .nav-button button{
  padding: 10px 30px;
  font-size: 17px;
}

/*Hamburger menu*/
  /*ham*/
  .ham {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 400ms;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.hamRotate.active {
  transform: rotate(45deg);
}
.hamRotate180.active {
  transform: rotate(180deg);
}
.line {
  fill:none;
  transition: stroke-dasharray 400ms, stroke-dashoffset 400ms;
  stroke:#fff;
  stroke-width:5.5;
  stroke-linecap:round;
}

.ham4 .top {
  stroke-dasharray: 40 121;
}
.ham4 .bottom {
  stroke-dasharray: 40 121;
}
.ham4.active .top {
  stroke-dashoffset: -68px;
}
.ham4.active .bottom {
  stroke-dashoffset: -68px;
}
/*ul menu*/
.nav-menu-mob .mob-links {
  display: flex;
  position: absolute;
  background: #121A21;
  height: 0;
  width: 100%;
  top:84px;
  left: 0;
  flex-direction: column;
  justify-content: center;
  transition: 1s ease;
  overflow: hidden;
}
.nav-menu-mob .mob-links.active {
  top: 0;
  height: 100vh;
}
.nav-menu-mob ul li{
  margin: 30px 0;
  font-size: 3rem;
  text-decoration: none;
  list-style-type: none;
  color: #fff;
  text-align: center;
}
.nav-menu-mob button{
  margin-top: 50px;
}




@media (max-width: 910px){
  
}








              
            
!

JS

              
                const hamburger = document.querySelector('.hamburger')
const ulMobLinks = document.querySelector('.mob-links')

hamburger.addEventListener('click', ()=> {  ulMobLinks.classList.toggle('active');
})
              
            
!
999px

Console