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

              
                <body>
  <!-- header -->
  <header class="header">
    <h1 class="site-title"><a href="./">クリ★スタ</a></h1><!-- ①サイトタイトル -->
    <div class="nav-wrapper">
      <!-- ②ナビゲーションメニュー -->
      <nav class="header-nav">
        <ul class="nav-list">
          <li class="nav-item"><a href="https://crestadesign.org/">About</a></li>
          <li class="nav-item"><a href="https://crestadesign.org/">News</a></li>
          <li class="nav-item"><a href="https://crestadesign.org/">Access</a></li>
        </ul>
      </nav>
    </div>
    <button class="burger-btn">
      <!-- ③ハンバーガーボタン -->
      <span class="bar bar_top"></span>
      <span class="bar bar_mid"></span>
      <span class="bar bar_bottom"></span>
    </button>
  </header>
  <!-- //header -->

  <main>
    <!-- fv -->
    <div class="fv">
      <p class="main-copy">Cresta.Design</p>
    </div>
    <!-- //fv -->
    <!-- about -->
    <section class="section-wrapper" id="about">
      <h2 class="section-title">About</h2>
      <h3 class="about-title">ミニマルで<br>洗練されたデザインを。</h3>
      <p class="text_about">
        近年、ミニマルなデザインが流行しています。そこで弊社では、クライアント企業様新規サービス等の課題に対してミニマルで洗練されたデザインを実現させることで解決のサポートを致します。もちろん全てのサービスにおいてミニマルなデザインが課題解決になるわけではないので、課題や今後のサービスの展開等しっかりとヒアリングを行なった上でご提案させて頂きます。
      </p>
    </section>
    <!-- //about -->
  </main>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  <script src="./js/script.js"></script>
</body>
              
            
!

CSS

              
                /**
 * YUI 3.5.0 - reset.css (http://developer.yahoo.com/yui/3/cssreset/)
 * http://cssreset.com
 * Copyright 2012 Yahoo! Inc. All rights reserved.
 * http://yuilibrary.com/license/
 */
/*
	TODO will need to remove settings on HTML since we can't namespace it.
	TODO with the prefix, should I group by selector or property for weight savings?
*/
html {
	background: #fff;
	color: #000;
}
/*
	TODO remove settings on BODY since we can't namespace it.
*/
/*
	TODO test putting a class on HEAD.
		- Fails on FF.
*/
body , div , dl , dt , dd , ul , ol , li , h1 , h2 , h3 , h4 , h5 , h6 , pre , code , form , fieldset , legend , input , textarea , p , blockquote , th , td {
	margin: 0;
	padding: 0;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}
fieldset , img {
	border: 0;
}
/*
	TODO think about hanlding inheritence differently, maybe letting IE6 fail a bit...
*/
address , caption , cite , code , dfn , em , strong , th , var {
	font-style: normal;
	font-weight: normal;
}

ol , ul {
	list-style: none;
}

caption , th {
	text-align: left;
}
h1 , h2 , h3 , h4 , h5 , h6 {
	font-size: 100%;
	font-weight: normal;
}
q:before , q:after {
	content: "";
}
abbr , acronym {
	border: 0;
	font-variant: normal;
}
/* to preserve line-height and selector appearance */
sup {
	vertical-align: text-top;
}
sub {
	vertical-align: text-bottom;
}
input , textarea , select {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
}
/*to enable resizing for IE*/
input , textarea , select {
	font-size: 100%;
}
/*because legend doesn't inherit in IE */
legend {
	color: #000;
}
/* YUI CSS Detection Stamp */
#yui3-css-stamp.cssreset {
	display: none;
}

/* style.css */

/* -------------------- */
/* base
/* -------------------- */
body {
	font-family: "Roboto", "Noto Sans JP", sans-serif;
}
li {
	list-style: none;
}
a {
	color: #fff;
	text-decoration: none;
}
img {
	vertical-align: bottom;
	width: 100%;
}



/* -------------------- */
/* header
/* -------------------- */
.header {
	align-items: center;
	background-color: #1b1310;
	border-bottom: 1px solid #fff;
	color: #fff;
	display: flex;
	height: 74px;
	justify-content: space-between;
	padding: 0 120px;
}
.nav-list {
	/* navの横並び */
	display: flex;
}
.nav-item {
	/* メニューの右側に余白 */
	margin-right: 55px;
}

.burger-btn {
	display: none;
}

/* ------------------ */
/* fv
/* ------------------ */
.fv {
	align-items: center;
	background-color: #141414;
	background-image: url(../img/fv-bgi@2x.jpg);
	background-position: center;
	background-size: cover;
	display: flex;
	flex-direction: column;
	height: 90vh;
	justify-content: center;
}
.main-copy {
	border: 2px solid #fff;
	color: #fff;
	font-size: 50px;
	font-weight: bold;
	padding: 34px 42px;
}

/* ------------------ */
/* about
/* ------------------ */
.section-title {
	font-size: 36px;
	font-weight: bold;
	letter-spacing: .05em;
	margin-bottom: 70px;
	text-align: center;
}
h3 {
	font-size: 2.4rem;
	font-weight: bold;
	letter-spacing: .1em;
	line-height: 2;
	margin-bottom: 40px;
}
.section-wrapper {
	padding: 100px 10% 50px;
}

@media screen and (max-width:768px) {
  /* ----------------------- */
	/* base_sp
  /* ----------------------- */
  /* デフォルトのbuttonスタイルをリセット */
	button {
		-webkit-appearance: none;
		-moz-appearance: none;
		appearance: none;
		background: transparent;
		border: 0;
		border-radius: 0;
		color: inherit;
		cursor: pointer;
		font: inherit;
		margin: 0;
		outline: none;
		padding: 0;
		vertical-align: middle;
	}
  
  /* ------------------ */
	/* humberger-menu */
	/* ------------------ */
	.header {
		padding: 0 5%;
	}
    
/* 以下、ハンバーガーボタン */
	.burger-btn {
		display: block;
		height: 39px;
		position: relative;
		width: 39px;
		z-index: 3;
    /* codepenの挙動のため */
		background-color: transparent;
		border: none;
	}
  
	.bar {
		background-color: #fff;
		display: block;
		height: 1px;
		left: 50%;
		position: absolute;
		transform: translateX(-50%);
		width: 20px;
	}
	.bar_top {
		top: 10px;
	}
	.bar_mid {
		top: 50%;
		transform: translate(-50%,-50%);
	}
	.bar_bottom {
		bottom: 10px;
	}
	.burger-btn.close .bar_top {
		transform: translate(-50%,10px) rotate(45deg);
		transition: transform .3s;
	}
	.burger-btn.close .bar_mid {
		opacity: 0;
		transition: opacity .3s;
	}
	.burger-btn.close .bar_bottom {
		transform: translate(-50%,-8px) rotate(-45deg);
		transition: transform .3s;
	}
  /* スクロール制御 */
  .noscroll{
    overflow: hidden;
  }
  
  /* 以下、ハンバーガーメニュー */
	.nav-wrapper {
    visibility: hidden;
		height: 100vh;
		left: 0;
		position: fixed;
		top: 0;
		width: 100vw;
    opacity: 0;
    transition: opacity .5s;
		z-index: 2;/*キービジュアルと.btn_triggerとの重なりの前後関係を調整*/
	}
  
  .header-nav {
		background-color: #1b1310;
		height: 100%;
		width: 100%;
		z-index: 2;
	}
	.nav-list {
		display: block;
		left: 50%;
		position: absolute;
		text-align: center;
		top: 50%;
		transform: translate(-50%,-50%);
	}
	.nav-item {
		margin-bottom: 40px;
		margin-right: 0;
	}
  
  /* メニューオープン時 */
	.nav-wrapper.fade {
		opacity: 1;
		visibility: visible;
	}
  
	/* ------------------ */
	/* fv */
	/* ------------------ */
	.main-copy {
		font-size: 30px;
	}

	/* ------------------ */
	/* about */
	/* ------------------ */
	h3 {
		font-size: 20px;
		margin-bottom: 30px;
	}
	.section-wrapper {
		padding: 100px 5% 50px;
	}
}
              
            
!

JS

              
                
$('.burger-btn').on('click',function(){//.btn_triggerをクリックすると
  $('.burger-btn').toggleClass('close');//.btn_triggerにcloseクラスを付与(ボタンのアニメーション)
  $('.nav-wrapper').toggleClass('fade');//.nav-wrapperに
  $('body').toggleClass('noscroll');//bodyにnoscrollクラスを付与(スクロールを固定)
 });
              
            
!
999px

Console