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 href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

<section class="FAB">
	<div class="FAB__mini-action-button">
		<div class="mini-action-button--hide mini-action-button">
			<i class="mini-action-button__icon material-icons">assistant_photo</i>
			<p class="mini-action-button__text--hide">Add Flag</p>
		</div>
		<div class="mini-action-button--hide mini-action-button">
			<i class="mini-action-button__icon material-icons">audiotrack</i>
			<p class="mini-action-button__text--hide">Add Song</p>
		</div>
		<div class="mini-action-button--hide mini-action-button">
			<i class="mini-action-button__icon material-icons">videogame_asset</i>
			<p class="mini-action-button__text--hide">Add Game</p>
		</div>
		<div class="mini-action-button--hide mini-action-button">
			<i class="mini-action-button__icon material-icons">palette</i>
			<p class="mini-action-button__text--hide">Add Art</p>
		</div>
	</div>
	<div class="FAB__action-button">
		<i class="action-button__icon material-icons">add</i>
		<p class="action-button__text--hide">Add Customer</p>
	</div>
</section>

<div class="snackbar"><p class="snackbar-text">Added Art</p></div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Roboto:200,300,400);

@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css);

@mixin circleShadow($vertical) {
	box-shadow:0 0 $vertical rgba(0,0,0,.14),0 $vertical $vertical*2 rgba(0,0,0,.28)
}

.snackbar {
	bottom: 1em;
	left: 1em;
	position: fixed;
	
	&-text {
		background-color: #212121;
		border-radius: 0.19em;
		color: #FFF;
		display: inherit;
		font-family: 'Roboto';
		font-size: 0.8em;
		font-weight: 200;
		min-width: 15em;
		padding: 1em 2em;
		position: relative;
		text-align: left;
  }
}

.FAB {
	position: absolute;
	bottom: 30px;
	right: 60px;
	width: 56px;
	
	&__action-button,
	&__mini-action-button{
		cursor: pointer;
		position: absolute;
	}
	
	&__action-button {
		bottom: 0;
		right: 0;
		
		&:hover {
			.action-button__icon {
				@include circleShadow(8px);
			}
		}
	}
	
	&__mini-action-button {
		bottom: 0;
		right: 49px;
		
		
	}
	
	
}

.action-button {
	&__icon{
		@include circleShadow(4px);
		background-color: #ff4081;
		border-radius: 50%;
		color: #fff;
		padding: 16px;
	}
	
	&__text {
		
		&--hide {
			display: none;
		}
		
		&--show {
			background-color: #212121;
			border-radius: 3px;
			color: #fff;
			right: 75px;
			font-size: 14px;
			font-family: "Helvetica Neue";
			opacity: .8;
			padding: 5px 9px;
			position: absolute;
			top: 2px;
			white-space: nowrap;
		}
	}
}

.mini-action-button {
	
	&__icon {
		@include circleShadow(4px);
		background-color: #536DFE;
		border-radius: 50%;
		color: #fff;
		padding: 8px;
		
		&:hover {
			@include circleShadow(8px);
		}
		
	}
	
	&__text {
		
		&--hide {
			display: none;
		}
		
		&--show {
			background-color: #212121;
			border-radius: 3px;
			color: #fff;
			display: block;
			right: 60px;
			font-size: 14px;
			font-family: "Helvetica Neue";
			opacity: .8;
			padding: 5px 9px;
			position: absolute;
			top: -6px;
			white-space: nowrap;
		}
	}

	&--show {
		position: absolute;
		text-align: center;	
	}
	
	&--hide {
		display: none;
		opacity: 0;
	}
}

@for $i from 1 through 10 {
	.mini-action-button--show:nth-child(#{$i}) {
		bottom: 20px + 60px * $i;
	}
}

              
            
!

JS

              
                var x = $('.FAB__mini-action-button').find('.mini-action-button--hide').length * 60 + 60;

$('.FAB').hover(function(){
	$('.FAB').height(x);
}, function(){
	$('.mini-action-button--show').attr('class', 'mini-action-button--hide');
	$('.FAB').height(0);
});

$('.mini-action-button').hover(function(){
	$(this).find('.mini-action-button__text--hide').attr('class', 'mini-action-button__text--show');
}, function(){
	$(this).find('.mini-action-button__text--show').attr('class', 'mini-action-button__text--hide');
});

$('.FAB__action-button').hover(function(){
	$(this).find('.action-button__text--hide').attr('class', 'action-button__text--show');
	$('.mini-action-button--hide').attr('class', 'mini-action-button--show');
}, function(){
	$(this).find('.action-button__text--show').attr('class', 'action-button__text--hide');
});
              
            
!
999px

Console