Pen Settings



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


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


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.


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.


                <script type="text/javascript" src=""></script> 

<div class="wrap-thin demo-thin">
      <div class="viewport"> <a href="#"> <span class="dark-background">Northern Saw-whet Owl <em>Photo by Matt Bango</em></span> <img src="" alt="Northern Saw-Whet Owl" /> </a> </div>
      <div class="viewport no-margin"> <a href="#"> <span class="dark-background">Red-shouldered Hawk <em>Photo by Matt Bango</em></span> <img src="" alt="Red-shouldered Hawk" /> </a> </div>
      <div class="viewport"> <a href="#"> <span class="dark-background">Blue-headed Vireo <em>Photo by Matt Bango</em></span> <img src="" alt="Blue-headed Vireo" /> </a> </div>
      <div class="viewport no-margin"> <a href="#"> <span class="dark-background">Wood Thrush <em>Photo by Matt Bango</em></span> <img src="" alt="Wood Thrush" /> </a> </div>


                body {
	font-family: 'Helvetica Neue', Helvetica, Arial, serif;
	font-size: 62.5%;
	margin: 0;
	padding: 0;
.wrap-thin {
	margin: 0 auto;
	width: 921px;
.demo-thin {
	margin-top: 15px;
a {
	text-decoration: none;
/* --- Container configuration ---------------------------------------------------------- */
.viewport {
	border: 3px solid #eee;
	float: left;
	height: 299px;
	margin: 0 9px 9px 0;
	overflow: hidden;
	position: relative;
	width: 450px;
/* This is so that the 2nd thumbnail in each row fits snugly. You will want to add a similar
           class to the last thumbnail in each row to get rid of the margin-right. */
.no-margin {
	margin-right: 0;
/* --- Link configuration that contains the image and label ----------------------------- */
.viewport a {
	display: block;
	position: relative;
.viewport a img {
	height: 332px;
	left: -20px;
	position: relative;
	top: -20px;
	width: 500px;
/* --- Label configuration -------------------------------------------------------------- */
.viewport a span {
	display: none;
	font-size: 3.0em;
	font-weight: bold;
	height: 100%;
	padding-top: 120px;
	position: absolute;
	text-align: center;
	text-decoration: none;
	width: 100%;
	z-index: 100;
.viewport a span em {
	display: block;
	font-size: 0.45em;
	font-weight: normal;
/* --- Dark hover background ------------------------------------------------------------ */
.dark-background {
	background-color: rgba(15, 15, 15, 0.6);
	color: #fff;
	text-shadow: #000 0px 0px 20px;
.dark-background em {
	color: #ccc;


                 $(document).ready(function() {
        $('.viewport').mouseenter(function(e) {
            $(this).children('a').children('img').animate({ height: '299', left: '0', top: '0', width: '450'}, 100);
        }).mouseleave(function(e) {
            $(this).children('a').children('img').animate({ height: '332', left: '-20', top: '-20', width: '500'}, 100);