Pen Settings

HTML

CSS

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

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

Auto Save

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="polaroidbody">
	<div class="lights1"></div>
	<div class="lights2"></div>
	<div class="rainbow">
		<div class="pink"></div>
		<div class="amber"></div>
		<div class="yellow1"></div>
		<div class="yellow2"></div>
		<div class="green"></div>
		<div class="blue"></div>
	</div>
	<div class="lensoutline">
		<div class="lens-layer1">
			<div class="lens-layer2outline">
				<p class="polaroid-lenstext">POLAROID CAMERA + PRINTER</p>
				<div class="lens-layer2">
					<div class="lens-layer2filler1"></div>
					<div class="lens-layer2filler2"></div>
					<div class="lens-layer2filler3"></div>
					<div class="lens-layer2filler4"></div>
					<div class="lens-layer2filler5"></div>
					<div class="lens-layer3outline"></div>
					<div class="lens-layer3">
						<div class="lens-glass"></div>
						<div class="lens-closed"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="flash-border">
		<div class="flash-filler1"></div>
		<div class="flash-filler2"></div>
		<div class="flash-filler3"></div>
		<div class="flash-filler4"></div>
		<div class="flash"></div>
	</div>
	<div class="viewfinder-body">
		<div class="viewfinder-border1"></div>
		<div class="viewfinder-border2"></div>
		<div class="viewfinder"></div>
	</div>
	<div class="shotbutton"></div>
</div>

<div class="areashot bot_1">
	<div id="shot" class="beforepullout startingshotposition"></div>
</div>

<a class="backbutton invisible"><span>─</span>Put it away and take a new shot<span>─</span></a>
              
            
!

CSS

              
                body {
	margin: 0px;
	background: #ECEFF1;
}

.polaroidbody {
	position: absolute;
	right: calc(50vw - 275px);
	top: calc(50vh - 175px);
	width: 575px;
	height: 345px;
	background: #edeef0;
	/*border-radius: 45px 0px 0px 45px;*/
	border-radius: 45px;
	-webkit-box-shadow: inset 15px -25px 55px -10px rgba(0,0,0,0.25), inset -15px 15px 40px -7px rgba(255,255,255,0.70), inset -15px 0px 10px -11px rgba(0,0,0,0.30);
	-moz-box-shadow: inset 15px -25px 55px -10px rgba(0,0,0,0.25), inset -15px 15px 40px -7px rgba(255,255,255,0.70), inset -15px 0px 10px -11px rgba(0,0,0,0.30);
	box-shadow: inset 15px -25px 55px -10px rgba(0,0,0,0.25), inset -15px 15px 40px -7px rgba(255,255,255,0.70), inset -15px 0px 10px -11px rgba(0,0,0,0.30);
}

.lensoutline {
	position: absolute;
	/*background: #393939;*/
	background: #212121;
	width: 190px;
	height: 190px;
	border-radius: 100%;
	margin-left: 200px;
	top: calc(50% - 95px);
	box-shadow: -7px 7px 50px -2px rgba(0,0,0,0.60), 9px -9px 20px 7px rgba(255,255,255,0.7);
}

.lens-layer1{
	position: absolute;
	/*background: #393939;*/
	background: linear-gradient(-30deg, #3c3c3c, #454648, #3b3b3b);
	width: 175px;
	height: 175px;
	border-radius: 100%;
	margin-left: 7.5px;
	top: 7.5px;
}

.lens-layer2outline{
	position: absolute;
	background: #2c2c2c;
	width: 120px;
	height: 120px;
	border-radius: 100%;
	margin-left: 27.5px;
	top: 27.5px;
}

.lens-layer2filler1{
	position: absolute;
	background: #2a2a2a;
	width: 92px;
	height: 92px;
	border-radius: 100%;
	margin-left: 4px;
	top: 4px;
	border: 1px solid #353535;
}


.lens-layer2filler2{
	position: absolute;
	background: #2b2b2b;
	width: 84px;
	height: 84px;
	border-radius: 100%;
	margin-left: 8px;
	top: 8px;
	border: 1px solid #353535;
}

.lens-layer2filler3{
	position: absolute;
	background: #2a2a2a;
	width: 76px;
	height: 76px;
	border-radius: 100%;
	margin-left:12px;
	top: 12px;
	border: 1px solid #353535;
}

.lens-layer2filler4{
	position: absolute;
	background: #2b2b2b;
	width: 68px;
	height: 68px;
	border-radius: 100%;
	margin-left: 16px;
	top: 16px;
	border: 1px solid #353535;
}

.lens-layer2filler5{
	position: absolute;
	background: #2a2a2a;
	width: 60px;
	height: 60px;
	border-radius: 100%;
	margin-left: 20px;
	top: 20px;
	border: 1px solid #353535;
}

.lens-layer2{
	position: absolute;
	/*background: #2a2a2a;*/
	background: #313131;
	width: 100px;
	height: 100px;
	border-radius: 100%;
	margin-left: 10px;
	top: 10px;
}

.polaroid-lenstext{
	position: absolute;
	color: #fff;
	font-size: 4.5px;
	font-family: Verdana;
	margin-left: 40px;
	margin-top: 5px;
	transform: rotate(-15deg);
}
.polaroid-lenstext span {
	position: absolute;
	transform-origin:  bottom center;
	height: 55px;
	width: 10px;
}

.char1 { transform: rotate(-41deg); }/* P */
.char2 { transform: rotate(-37deg); }/* O */
.char3 { transform: rotate(-31deg); }/* L */
.char4 { transform: rotate(-26deg); }/* A */
.char5 { transform: rotate(-21deg); }/* R */
.char6 { transform: rotate(-16deg); }/* O */
.char7 { transform: rotate(-11deg); }/* I */
.char8 { transform: rotate(-7.5deg); }/* D */
.char9 { transform: rotate(0deg); }/*   */
.char10 { transform: rotate(6deg); }/* C */
.char11 { transform: rotate(11deg); }/* A */
.char12 { transform: rotate(16deg); }/* M */
.char13 { transform: rotate(22deg); }/* E */
.char14 { transform: rotate(27deg); }/* R */
.char15 { transform: rotate(32deg); }/* A */
.char16 { transform: rotate(35deg); }/*   */
.char17 { transform: rotate(40deg); }/* + */
.char18 { transform: rotate(46deg); }/*   */
.char19 { transform: rotate(48deg); }/* P */
.char20 { transform: rotate(53deg); }/* R */
.char21 { transform: rotate(59deg); }/* I */
.char22 { transform: rotate(63deg); }/* N */
.char23 { transform: rotate(70deg); }/* T */
.char24 { transform: rotate(74.5deg); }/* E */
.char25 { transform: rotate(80deg); }/* R */

.lens-layer3outline {
	position: absolute;
	background: #414244;
	width: 50px;
	height: 50px;
	border-radius: 100%;
	margin-left: 25px;
	margin-top: 25px;
	opacity: 0.35;
}

.lens-layer3 {
	position: absolute;
	background: #0d0d0d;
	width: 37px;
	height: 37px;
	border-radius: 100%;
	margin-left: 31.3px;
	margin-top: 31.3px;
}

.lens-glass {
	position: absolute;
	/*background: #3F51B5;*/
	background: #343539;
	width: 25px;
	height: 25px;
	border-radius: 100%;
	margin-left:6px;
	margin-top: 6px;
	/*opacity: 0.2;*/
}
.glasseffect {
	position: absolute;
	background: #607D8B;
	width: 15px;
	height: 20px;
	border-radius: 100%;
	margin-left:17px;
	margin-top: 7px;
	opacity: 0.3;
	-webkit-filter: blur(3px);
	-moz-filter: blur(3px);
	-ms-filter: blur(3px);
	filter: blur(3px);
}

.lens-closed {
	position: absolute;
	width: 1px;
	height: 25px;
	transform: rotate(-45deg);
	background: #0d0d0d;
	left: 18px;
	top: 6px;
}

.flash {
	position: absolute;
	width: 25px;
	height: 25px;
	border-radius: 100%;
	/*background: #faf7e0;*/
	background: radial-gradient(#FFFDE7, #d7d7ce, #8c8c8c);
	top: 2px;
	left: 2px;
}

.flash-border {
	position: absolute;
	width: 29px;
	height: 29px;
	border-radius: 100%;
	background: linear-gradient(-30deg, #868686, #d6d6d6);
	top: 50px;
	left: 147px;
}

.viewfinder-body {
	position: absolute;
	width: 145px;
	height: 55px;
	background: #272727;
	border-width: 1px 1px 0px 1px;
	border-style: solid;
	border-color: #212121;
	border-radius: 13px 13px 5px 5px;
	top: -50px;
	left: 220px;
}

.viewfinder-border1 {
	position: absolute;
	background: #313131;
	width: 60px;
	height: 45px;
	border-radius: 10px 10px 5px 5px;
	left: 42.4px;
	top: 5.2px;
	border: 1px solid #424242;
}

.viewfinder-border2 {
	position: absolute;
	background: #272727;
	width: 57px;
	height: 43px;
	border-radius: 10px 10px 5px 5px;
	left: 44px;
	top: 7px;
	border: 1px solid #424242;
}

.viewfinder {
	position: absolute;
	background: #eceff1;
	width: 50px;
	height: 37px;
	border-radius: 5px;
	left: 48.3px;
	top: 12px;
}

.shotbutton {
	position: absolute;
	/*background: #EF5350;*/
	background: linear-gradient(0deg, #EF5350, #E57373);
	width: 50px;
	height:7px;
	border-radius: 100%;
	left: 55px;
	top: -5px;
	transition: all 0.3s ease;
	cursor: pointer;
}

.shotbutton:active {
	transform: translateY(1px) scaleY(.7);
}

.rainbow {
	position: absolute;
	width: 274px;
	height: 33px;
	left: 300px;
	top: 160px;
}

.pink {
	background: #df118f;
	height: 5px;
	border-radius: 0px 4px 0px 0px;
}

.amber {
	background: #e39d25;
	height: 5px;
}

.yellow1 {
	background: #ffd30c;
	height: 5px;
}

.yellow2 {
	background: #e9f178;
	height: 5px;
}

.green {
	background: #76c045;
	height: 5px;
}

.blue {
	background: #08a1e2;
	height: 5px;
	border-radius: 0px 0px 4px 0px;
}
/*
.lights1 {
	background: transparent;
	position: absolute;
	right: 40px;
	width: 50px;
	height: 300px;
	border-radius: 0px 45px 0px 0px;
	z-index: 999;
	box-shadow: inset -15px 15px 40px -5px rgba(255,255,255,0.70);
}
.lights2 {
	background: transparent;
	position: absolute;
	right: -10px;
	top: 10px;
	width: 50px;
	height: 275px;
	border-radius: 0px 0px 0px 0px;
	z-index: 999;
	box-shadow: inset 15px 0px 40px -5px rgba(255,255,255,0.70);
}*/

.lights1 {
	position: absolute;
	width: 12px;
	height: 300px;
	background: #fff;
	right: 13px;
	top: 15px;
	z-index: 998;
	filter: blur(7px);
	opacity: 0.9;
}

.flash-filler1 {
	background: transparent;
	position: absolute;
	width: 18.5px;
	height: 18.5px;
	z-index: 998;
	border-radius: 100%;
	top: 4px;
	left: 4px;
	border: 1px solid black;
	opacity: 0.10;
}

.flash-filler2 {
	background: transparent;
	position: absolute;
	width: 15px;
	height: 15px;
	z-index: 998;
	border-radius: 100%;
	top: 5.8px;
	left: 5.8px;
	border: 1px solid black;
	opacity: 0.10;
}

.flash-filler3 {
	background: transparent;
	position: absolute;
	width: 11px;
	height: 11px;
	z-index: 998;
	border-radius: 100%;
	top: 7.7px;
	left: 7.7px;
	border: 1px solid black;
	opacity: 0.10;
}

.flash-filler4 {
	background: transparent;
	position: absolute;
	width: 7px;
	height: 7px;
	z-index: 998;
	border-radius: 100%;
	top: 9.6px;
	left: 9.6px;
	border: 1px solid black;
	opacity: 0.10;
}

#shot {
	position: fixed;
	width: 370px;
	height: 225px;
	background: url(https://images.pexels.com/photos/87293/pexels-photo-87293.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb);
	background-size: cover;
	background-position: center;
	border-radius: 1px;
}

.beforepullout {
	transition: all 0.3s ease;
	cursor: pointer;
}

.beforepullout:hover {
	transform: translate(calc(50vw - 470px))!important;
}

.startingshotposition {
	top: calc(50vh - 112.5px);
	transform: translate(calc(50vw - 465px));
}

.afterclickshotposition {
	top: calc(50vh - 112.5px);
	transform: rotateY(0deg) scale(1.05) translate(calc(50vw - 225px));
}

.animationsh {
	top: calc(50vh - 112.5px);
	width: 370px;
	height: 225px;
	animation: shotanimation 3s ease;
}
/*
@-webkit-keyframes shotanimatiom {
	0% {left: calc(50vw - 470px); transform: rotateY(0deg)}
	30% {left: calc(50vw - 725px); transform: rotateY(-15deg)}
	100% {left: calc(50vw - 185px); transform: rotateY(0deg) scale(1.05)}
}*/

@-webkit-keyframes shotanimation {
	0% {transform: rotateY(0deg) translate(calc(50vw - 470px))}
	30% {transform: rotateY(-15deg) scale(0.9) translate(calc(50vw - 700px))}
	100% {transform: rotateY(0deg) scale(1.05) translate(calc(50vw - 225px))}
}

@-webkit-keyframes backtothecamera {
	0% {transform: rotateY(0deg) scale(1.05) translate(calc(50vw - 225px)); opacity: 1;}
	37% {transform: rotateY(0deg) scale(1.05) translate(calc(50vw - 225px)); opacity: 0;}
/*	31% {transform: rotateY(0deg) scale(1) translate(calc(50vw - 230px)); opacity: 1;}
	100% {transform: rotateY(0deg) translate(calc(50vw - 470px))}*/
}

.returncamera {
	top: calc(50vh - 112.5px);
	animation: backtothecamera 3s ease;
}

.afterpullout {
	box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

#dragarea {
	cursor: grab;
	width: 370px;
	height: 225px;
}

.areashot {
	width: 100vw;
	height: 100vh;
	position: fixed;
	perspective: 900px;
	z-index: 999;
}

.bot_1 {
	z-index: -1 !important;
}

.invisible {
	opacity: 0;
	pointer-events: none;
}

.backbutton {
	font-family: PT Sans;
	font-size: 19px;
	position: absolute;
	bottom: calc(50vh - 225px);
	width: 100vw;
	z-index:999;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
}

.backbutton:hover {
	letter-spacing: 1.2px;
}
.backbutton span {
	color: transparent;
	transition: all 0.3s ease;
}

.backbutton:hover span {
	color: #000;
}
              
            
!

JS

              
                //Lettering.js
$(".polaroid-lenstext").lettering();
$('.polaroid-lenstext2').lettering();

//Shot... things

$('#shot').click(function(){
	$('#shot').removeClass('returncamera');
	$('#shot').addClass('animationsh');
	$('#shot').addClass('afterclickshotposition');
	$('#shot').removeClass('beforepullout');
	$('#shot').removeClass('startingposition');
	$('#shot').addClass('afterpullout');

	$('.areashot').delay(1000).queue(function() {
		$('a.backbutton').removeClass('invisible');
		$(".areashot").removeClass('bot_1').dequeue();
	});
});

$('.backbutton').click(function(){
	$('.areashot').delay(1000).queue(function() {
		$('a.backbutton').addClass('invisible');
		$(".areashot").addClass('bot_1').dequeue();
	});
	$('#shot').addClass('returncamera');
	$('#shot').removeClass('animationsh');
	$('#shot').removeClass('afterclickshotposition');
	$('#shot').addClass('beforepullout');
	$('#shot').addClass('startingposition');
	$('#shot').removeClass('afterpullout');
});
              
            
!
999px

Console