cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

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.

            
              <header class="zoom">
	<div class="title">
		<h1>Scroll to Zoom</h1>
				    <a href="http://webdesignerwall.com/tutorials/how-to-add-icon-fonts-to-any-element-with-css" alt="webdesignerwall.com" target="_blank"><button>View Tutorial</button></a>
	</div>
</header>
<main role="main">
	<div class="content">

		<p>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas sed diam eget risus varius blandit sit amet non magna. Nulla vitae elit libero, a pharetra augue. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p>
		<p>Curabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p>	
			<p>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas sed diam eget risus varius blandit sit amet non magna. Nulla vitae elit libero, a pharetra augue. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p>
		
	</div>
</main>
<footer>
<p>A <a href="http://www.webdeisgnerwall.com" alt="web designer wall" target="_blank">webdesignerwall.com</a> Tutorial</p>
</footer>
            
          
!
            
              /* --- General Pen Styles --- */
body{
	font-family: Georgia, serif;
	color: #333;
	font-size: 1.4rem;
	line-height: 2rem;
}
header{
	position: relative;
}
.title{
	text-align: center;
}
h1{
	font-size: 6vw;
	line-height: 1.125;
	font-family: 'Sansita';
	text-transform: uppercase;
}
.content{
	margin: 0 auto;
	max-width: 90%;
	width: 720px;
	height: 100%;
}
main{
	padding: 1% 0;
	position: relative;
	background: #f5f5f5;
	box-shadow: 0px -10px 60px rgba(0,0,0,0.25);
}
button{
  border: 3px solid #FFF;
  background: transparent;
  color: #FFF;
  font-size: 1rem;
  border-radius: 5px;
  height: 40px;
  line-height: 40px;
  padding: 0 20px;
  text-transform: uppercase;
  transition: all ease-in-out .3s;
}
button:hover{
	background: #FFF;
	color: #000;
	opacity: .7;
}

footer p{
	text-align: center;
	font-size: .8rem;
	font-weight: bold;
	color: #ccc;
}
footer a{color: #ccc;}
/* --- Important Pen Styles --- */

.zoom{
	overflow: hidden;
   padding-bottom: 60%;
	background-image: url(http://i.imgur.com/pkRkVCm.jpg);
	background-size: 100% 100%;
	background-position: top center;	
}
.title{
	position: absolute;
	top: 40%;
	width: 100%;
}
.title h1{
	text-align: center;
	color: #FFF;
}
@media (max-width: 1024px) {
	.content{text-align: justify;}
	.zoom{
		overflow: hidden;
   	padding-bottom: 60%;
	}
}
            
          
!
            
              $(window).scroll(function() {
  var scroll = $(window).scrollTop();
	$(".zoom").css({
		backgroundSize: (100 + scroll/5)  + "%",
		top: -(scroll/10)  + "%",

		//Blur suggestion from @janwagner: http://codepen.io/janwagner/ in comments
		//"-webkit-filter": "blur(" + (scroll/200) + "px)",
		//filter: "blur(" + (scroll/200) + "px)"
	});
});
            
          
!
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