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. 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.

+ 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

              
                <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
	<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>




<div class="contenedor-menu">
		<a href="#" class="btn-menu">Menu<i class="icono fa fa-bars"></i></a>

		<ul class="menu">
			<li><a href="#"><i class="icono izquierda fa fa-home"></i>Главная сайта</a></li>
			<li><a href="#"><i class="icono izquierda fa fa-star"></i>Вертикальное меню<i class="icono derecha fa fa-chevron-down"></i></a>
				<ul>
					<li><a href="http://www.falconmasters.com">Item 1</a></li>
					<li><a href="https://www.google.com">Item 2</a></li>
					<li><a href="http://www.tutorialdephp.com">Item 3</a></li>
					<li><a href="http://www.falconmasters.com">Item 4</a></li>
				</ul>
			</li>
			<li><a href="#"><i class="icono izquierda fa fa-share-alt"></i>Стильное вертикальное меню<i class="icono derecha fa fa-chevron-down"></i></a>
				<ul>
					<li><a href="#">Item 1</a></li>
					<li><a href="#">Item 2</a></li>
					<li><a href="#">Item 3</a></li>
					<li><a href="#">Item 4</a></li>
				</ul>
			</li>
			<li><a href="#"><i class="icono izquierda fa fa-envelope"></i>Вертикальное меню accordion на jQuery</a></li>
		</ul>
	</div>
              
            
!

CSS

              
                * {
	margin: 0;
	padding: 0;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

body {
	background: #0b2027;
	font-family: 'Roboto', sans-serif;
	line-height: 18px;
}

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

.btn-menu {
	display: none;
	padding: 20px;
	background: #0d2c44;
	color:#fff;
}

.btn-menu .icono {
	float: right;
}

.contenedor-menu {
	width: 32%;
	min-width: 300px;
	margin: 50px;
	display: inline-block;
	font-family: 'Roboto', sans-serif;
	line-height: 18px;
}

.contenedor-menu .menu {
	width: 100%;
}

.contenedor-menu ul {
	list-style: none;
}

.contenedor-menu .menu li a {
	color:#494949;
	display: block;
	padding: 15px 20px;
	background: #e9e9e9;
}

.contenedor-menu .menu li a:hover {
	background: #1a95d5;
	color:#fff;
}

.contenedor-menu .menu .icono {
	font-size: 12px;
	line-height: 18px;
}

.contenedor-menu .menu .icono.izquierda {
	float: left;
	margin-right: 10px; 
}

.contenedor-menu .menu .icono.derecha {
	float: right;
	margin-left: 10px; 
}

.contenedor-menu .menu ul {
	display: none;
}

.contenedor-menu .menu ul li a {
	background: #424242;
	color:#e9e9e9;
}

.contenedor-menu .menu .activado > a {
	background: #1a95d5;
	color:#fff;
}

@media screen and (max-width: 450px) {
	body {
		padding-top: 80px;
	}

	.contenedor-menu {
		margin: 0;
		width: 100%;
		position: fixed;
		top:0;
		z-index: 1000;
	}

	.btn-menu {
		display: block;
	}

	.contenedor-menu .menu {
		display: none;
	}
}
              
            
!

JS

              
                $(document).ready(function(){
	$('.menu li:has(ul)').click(function(e){
		e.preventDefault();

		if ($(this).hasClass('activado')){
			$(this).removeClass('activado');
			$(this).children('ul').slideUp();
		} else {
			$('.menu li ul').slideUp();
			$('.menu li').removeClass('activado');
			$(this).addClass('activado');
			$(this).children('ul').slideDown();
		}
	});

	$('.btn-menu').click(function(){
		$('.contenedor-menu .menu').slideToggle();
	});

	$(window).resize(function(){
		if ($(document).width() > 450){
			$('.contenedor-menu .menu').css({'display' : 'block'});
		}

		if ($(document).width() < 450){
			$('.contenedor-menu .menu').css({'display' : 'none'});
			$('.menu li ul').slideUp();
			$('.menu li').removeClass('activado');
		}
	});

	$('.menu li ul li a').click(function(){
		window.location.href = $(this).attr("href");
	});
});
              
            
!
999px

Console