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

              
                	<div class="sensor">
		<div class="title">Pure CSS Parallax Effect</div>
		<div class="parallax">
			<div class="name">Ruby</div>
			<div class="content">
				“	As a girl, I wanted to be just like those heroes in the books. Someone who fought for what was right and protected people who couldn't protect themselves!	”
—Ruby, on her motivations for becoming a Huntress
			</div>
		</div>
		<div class="parallax">
			<div class="name">Weiss</div>
			<div class="content">
				“My father was not the start of our name, and I refuse to let him be the end of it.	”
—Weiss, regarding her future
			</div>
		</div>
		<div class="parallax">
			<div class="name">Blake</div>
			<div class="content">
				“	With all due respect, you need to start taking some larger strides. Until then, I'd rather avoid any unnecessary attention. I want people to see me for who I am, not what I am.	”
—Blake, to Ozpin on keeping her identity a secre
			</div>
		</div>
		<div class="parallax">
			<div class="name">Yang</div>
			<div class="content">
				“	I still want to know what happened to my mother and why she left me, but I will never let that search control me.	”
—Yang, to Blake Belladonna
			</div>
		</div>
		<div class="footer">
			<div>
				Image Source:
				<a href="http://www.pixiv.net/" target="_blank">Pixiv.net</a><br>
				Introduction Source:
				<a href="http://rwby.wikia.com/wiki/RWBY_Wiki" target="_blank">RWBY wiki</a>
			</div>
		</div>
	</div>
              
            
!

CSS

              
                @import "compass/css3";
$backColor: #141414;
$w: 100vw;
$h: 100vh;

* {
	margin: 0px;
	padding: 0px;
}

.sensor {
	height: $h;
	overflow-y: scroll;
	background: black;
	width: 100%;

	.title {
		font-family: Arial;	
		font-size: 3em;
		height: 80px;
		color: white;
		vertical-align: middle;
		text-align: center;
		&:after{
			vertical-align: middle;
			display:inline-block;
			content: '';
			height: 100%;
		}
	}
	.parallax {
		overflow: hidden;

		font-family: arial;
		font-size: 3em;
		border: 1px solid rgba(0, 0, 0, 0.5);
		height: $h * 0.7;
		@include box-sizing(border-box);
		background-size: 120% auto;
		background-attachment: fixed;
		vertical-align: middle;

		&:hover {
			& div {
				opacity: 1;
			}
		}

		&:after {
			display: inline-block;
			content: "";
			height: 100%;
			vertical-align: middle;
			// border: 1px solid red;
		}

		.name{
			@include transition(opacity 0.3s);
			opacity: 0;
			background-color: rgba(255,255,255,0.5);
			padding: 1%;
			text-align: center;
			margin: 2%;
			width: 20%;
			display: inline-block;
			vertical-align: middle;
		}

		.content {
			@include transition(opacity 0.2s 0.1s);
			@include box-sizing(border-box);
			position: relative;
			opacity: 0;
			background: rgba(0, 0, 0, 0.6);
			font-size: 0.5em;
			font-family: arial;
			line-height: 1.5em;
			text-align: justify;
			color: white;
			width: 70%;
			display: inline-block;
			vertical-align: middle;
			border: $w*0.05 solid transparent;
		}

		&:nth-child(2) {
			background-image: url("https://puu.sh/oXDLO/7b5a932ef1.jpg");
		}
		&:nth-child(3) {
			color: white;
			background-image: url("https://puu.sh/oXDNd/169a74d36c.jpg");
		}
		&:nth-child(4) {
			background-image: url("https://puu.sh/oXDNQ/bec8c790e4.jpg");
		}
		&:nth-child(5) {
			color: white;
			background-image: url("https://puu.sh/oXDO9/3c169032d0.jpg");
		}
	}
	.footer {
		text-align: center;
		font-family: Arial;
		font-size: 1em;
		height: 80px;
		color: white;
		div{
			display: inline-block;
			vertical-align: middle;
			line-height: 1.5em;
		}

		a {
			color: white;
		}
		&:after {
			display: inline-block;
			content: "";
			height: 80px;
			vertical-align: middle;
		}
	}
}
::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}
::-webkit-scrollbar-track {
	background-color: #ececec;
}
::-webkit-scrollbar-thumb {
	background-color: rgba(56, 89, 100, 0.4);
	border: 2px solid #e3e7f0;
}
::-webkit-scrollbar-button {
	height: 0px;
	background: red;
	width: 0px;
}
::-webkit-scrollbar-corner {
	margin-top: 20px;
	background-color: #e3e7f1;
}
              
            
!

JS

              
                /* Pure css parallax effect, without javascript */
              
            
!
999px

Console