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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              mixin portfolio_item(title, href, img)
	.columns.small-12.medium-6.large-4
		a.Slide-Card(href=href)
			.Slide-Card__img(style="background-image: url('#{img}');")
			.Slide-Card__title
				h4= title
			.Slide-Card__descr
				if block
					block
				else
					p  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam, amet assumenda obcaecati! Ea dignissimos eveniet veniam laudantium corrupti ad magni.

.row
	.columns.small-12.text-center
		h1 Your Portfolio Here!
.row
	+portfolio_item('Item 1!', 'javascript:void(0)', 'http://vignette2.wikia.nocookie.net/aceattorney/images/a/a5/Victorywv1.png/revision/latest?cb=20140628013037')
	+portfolio_item('Item 2!', 'javascript:void(0)', 'http://vignette1.wikia.nocookie.net/aceattorney/images/2/23/Apollo_Justice_Gaming.png/revision/20151224213436')
	+portfolio_item('Item 3!', 'javascript:void(0)', 'http://www.debold.com/webdesign/webdesignsix/jung/gallery/images/Phoenix-Wright-WiiWare1.jpg')
	+portfolio_item('Item 4!', 'javascript:void(0)', 'http://i.neoseeker.com/ca/phoenix_wright_ace_attorney_conceptart_xZGz7.jpg')
	+portfolio_item('Item 5!', 'javascript:void(0)', 'https://s-media-cache-ak0.pinimg.com/736x/aa/75/73/aa7573e58ff2b29fb4f776b7df5ef930.jpg')
	+portfolio_item('Item 6!', 'javascript:void(0)', 'http://operationrainfall.com/wp-content/uploads/2014/09/Professor-Layton-vs-Phoenix-Wright-Ace-Attorney-Featured.jpg')
            
          
!
            
              @import "bourbon";

$Slide-Card-height: 15em;

.Slide-Card {
	display: block;
	@include size(100% $Slide-Card-height);
	margin-bottom: 1em;
	position: relative;
	overflow: hidden;
	
	&:hover .Slide-Card__img,
	&:hover .Slide-Card__title,
	&:hover .Slide-Card__descr {
		@include transition(0.5s);
	}
	
	&:hover .Slide-Card__img { @include position(absolute, -4em null null null); }

	&:hover .Slide-Card__title { @include position(absolute, null null -40% null); }

	&:hover .Slide-Card__descr { @include position(absolute, null null 0 null); }
}

.Slide-Card__img {
	@include clearfix();
	@include transition(0.5s);
	@include position(absolute, -10% null null null);
	
	background-position: center center;
	background-repeat: none;
	background-size: cover;
	// width: auto !important;
	min-height: 130%;
	min-width: 100%;
	
	background-color: blue;
	opacity: 0.5;
	z-index: 0;
}

.Slide-Card__title,
.Slide-Card__descr {
	@include transition(0.5s);
	padding: 1em;
	box-sizing: border-box;
	overflow: hidden;
	
	color: white;
	
	background-color: rgba(0, 0, 0, 0.5);
}

.Slide-Card__title {
	@include position(absolute, null null 0 null);
	@include size(100% auto);
	padding: 0.5em 1em;
	
	text-align: center;
}

.Slide-Card__descr {
	@include position(absolute, null null 100% null);
	@include size(100% $Slide-Card-height);
	padding: 1em;
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

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

Console