cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation


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.

              <header class="header">
	<h1 class="logo">Navigation</h1>
	<nav class="global-nav">
			<li><a href="#">NEWS</a></li>
			<li><a href="#">ABOUT</a></li>
			<li><a href="#">ACCESS</a></li>
			<li><a href="#">CONTACT</a></li>
	<a href="#" class="open-button"></a>
</header><!-- // #header -->

	margin: 0;
	padding: 0;
	list-style: none;
	overflow: hidden;
	margin: 10px;

.global-nav {
	background: #efefef;
	transform-origin: center top;
	transform: translateX(100%);
	transition: transform .5s;
	overflow: hidden;
		  display: block;
		  padding: 10px 15px;
			color: black;
				text-decoration: none;

.open-button {
	display: block;
	width: 50px;
	height: 50px;
	position: fixed;
	top: 10px;
	right: 10px;
	line-height: 2.9em;
	background-color: pink;
	text-align: center;
		content: 'menu';

	.global-nav {
		overflow: hidden;
		transform: translateX(80%);
			background-color: #ccc;
		content: 'close';
              $(function() {
    var settings = {
        targetSelector : 'body', // オープン時にclassを付け外しする対象
        openClass : 'nav-open', // オープン時に付与するclass名
        navSelector : '.global-nav', // ナビゲーションのCSSセレクター
        buttonSelector : '.open-button', // 開閉ボタンのCSSセレクター
        fade : false, //フェードイン、アウトするか
        fadeSpeed : 400, //フェードイン、アウトの速度(1000=1秒)

    $(settings.buttonSelector).removeAttr('href').css('cursor', 'pointer').on('click', function(event) {
        var $target = $(settings.targetSelector);
        var $gNav = $(settings.navSelector);
        if($target.hasClass(settings.openClass)) {
          if(settings.fade) $gNav.fadeIn(settings.fade);
        } else {
          if(settings.fade) $gNav.fadeOut(settings.fade);
    if(settings.fade) $(settings.navSelector).css('display', 'none');

Loading ..................