css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="phone">
	<div class="logo">
		<svg xmlns="http://www.w3.org/2000/svg" width="327.504" height="319.333" viewBox="0 0 327.504 319.333"><g id="Layer_3" data-name="Layer 3"><path d="M275.456,146.734a10.344,10.344,0,0,1-3.03,7.314L226.1,200.374a4.138,4.138,0,0,1-7.063-2.926V93.643L274.812,38.18h.643Z" style="fill:#e34b5f"/><path d="M238.487,1.212a4.138,4.138,0,0,0-5.852,0L163.752,70.1H162.8v77.746l.956,2.042L219.037,94.6,275.456,38.18Z" style="fill:#e7ce9c"/><path d="M52.048,146.734a10.344,10.344,0,0,0,3.03,7.314L101.4,200.374a4.138,4.138,0,0,0,7.063-2.926V93.643L52.691,38.18h-.643Z" style="fill:#1e7889"/><path d="M94.868,1.212a4.138,4.138,0,0,0-5.852,0L52.048,38.18,108.467,94.6l55.285,55.285V70.1Z" style="fill:#97baa6"/></g></svg>
	</div>
	<div class="joinButton">
		Join Monzo
	</div>
</div>

<div class="envelope">
	<span>
		To, You<br/> Your address<br/> Your City
	</span>
</div>

<div class="cardWrapper">
  <a></a>
  <a></a>
  <a></a>
  <a></a>
  <a></a>
  <a></a>
  <a></a>
  <a></a>
  <a></a>
  <a></a>
  <a></a>
  <a></a>
  <div class="card">
		<div class="logo">
				<svg xmlns="http://www.w3.org/2000/svg" width="535.466" height="120" viewBox="0 0 535.466 120"><title>logo</title><g id="Layer_3" data-name="Layer 3"><path d="M174.256,88.2V26.547h16.417v8.266c3.789-6.314,9.3-9.414,16.762-9.414s13.088,3.215,17.106,9.873C230.97,28.5,235.907,25.4,243.6,25.4c13.892,0,21.7,7.807,21.7,22.158V88.2h-17.68V54.79c0-8.611-1.837-12.514-8.611-12.514-6.888,0-10.562,4.248-10.562,12.514V88.2h-17.8V54.79c0-8.611-1.837-12.514-8.611-12.514-6.889,0-10.562,4.248-10.562,12.514V88.2Z" style="fill:#ffffff"/><path d="M284.914,34.584A32.545,32.545,0,0,1,340.6,56.971c0,9.3-3.1,16.991-9.3,23.191a31.961,31.961,0,0,1-23.421,9.644c-9.414,0-16.991-3.215-23.306-9.873A32.218,32.218,0,0,1,275.5,57.2,31.6,31.6,0,0,1,284.914,34.584Zm23.076,38c8.037,0,14.581-6.774,14.581-15.155,0-8.5-6.544-15.269-14.581-15.269s-14.58,6.774-14.58,15.269C293.41,65.812,300.069,72.585,307.99,72.585Z" style="fill:#ffffff"/><path d="M350.8,88.2V26.547h17.221l-.23,8.266c3.789-6.2,9.529-9.414,17.68-9.414,12.744,0,21.01,8.036,21.01,22.158V88.2H388.34V54.79c0-8.611-1.837-12.514-8.84-12.514-7.118,0-10.907,4.248-10.907,12.514V88.2Z" style="fill:#ffffff"/><path d="M479.784,34.584a32.545,32.545,0,0,1,55.682,22.388c0,9.3-3.1,16.991-9.3,23.191a31.962,31.962,0,0,1-23.421,9.644c-9.414,0-16.992-3.215-23.306-9.873A32.219,32.219,0,0,1,470.37,57.2,31.6,31.6,0,0,1,479.784,34.584Zm23.076,38c8.036,0,14.581-6.774,14.581-15.155,0-8.5-6.544-15.269-14.581-15.269S488.28,48.935,488.28,57.431C488.28,65.812,494.939,72.585,502.861,72.585Z" style="fill:#ffffff"/><path d="M417.911,88.2V75.34l25.372-32.835H417.911V26.548h45.808v14.58L441.332,72.241h22.847V88.2Z" style="fill:#ffffff"/></g></svg>
			<span>BETA</span>
			</div>
		<div class="chipWrapper">
			<div class="chip">
				
			</div>
			<div class="contactless">
				<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" height="36.562082874611406" width="30.535940354838658" xml:space="preserve" version="1.1"><rect id="backgroundrect" width="100%" height="100%" x="0" y="0" fill="none" stroke="none"/><metadata id="metadata8"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/></cc:Work></rdf:RDF></metadata><defs id="defs6"/><g class="currentLayer"><title>Layer 1</title><g id="g10" class=""><g id="g12" stroke-width="0"><path id="path14" style="fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none" d="m22.224665426703098,33.76875197869242 c-0.5179708277130124,-0.14976638189703362 -1.0428433320111412,-0.7660861009479594 -1.1532701573730093,-1.3544540298291625 c-0.07177743648521423,-0.38304305047397974 0.01587385614576854,-0.6487575990009746 0.5649022284918064,-1.710580541621187 c2.218198854456524,-4.29111741679634 3.1823630733973345,-8.239911674970891 3.1823630733973345,-13.033471147163729 c0,-4.632060240101107 -0.8537373935789422,-8.236460836678331 -2.973932440526809,-12.556220211302907 c-0.4555106546177056,-0.9272402492104356 -0.8278561063847545,-1.7882244032037506 -0.8278561063847545,-1.9127996655651076 c0,-0.4596516605687757 0.38476846962025907,-1.126008534861798 0.801284651532055,-1.387582077437723 c0.5711137374184113,-0.35819701476755944 1.5283762797741045,-0.29125075189192695 1.986302521196601,0.13872369936084672 c0.17599275292047728,0.16564023804280217 0.6335739105137179,0.9165426505035049 1.0166169609876976,1.6684803144519749 c1.516988513408662,2.9794537817949016 2.5567260909565013,6.248087812506196 3.069865745059931,9.649924201310244 c0.3174771229153706,2.1057015261191214 0.38097254749844484,6.095905843804371 0.12733593299540413,8.023199030198224 c-0.46827875630017163,3.5557437766521507 -1.4069067718760502,6.728099419001066 -2.909401764455967,9.836269469108396 c-0.9082606386013645,1.8789814502980362 -1.4783391245320083,2.651624144001856 -1.9555900603928318,2.651624144001856 c-0.09558822070386704,0 -0.2512210276982498,0.023810784218652813 -0.34611908074360526,0.05314290970539901 c-0.09524313687461125,0.02864195782823454 -0.35716176327979204,-0.0006901676585116755 -0.5825015037838539,-0.06625609521712086 zm-6.174584956874702,-3.2299846418346396 c-0.7943829749469379,-0.23120616560141122 -1.3672221315116286,-1.2057228994198967 -1.1373963012272408,-1.935920282125249 c0.05555849651018986,-0.17668292057898885 0.42962936742351787,-0.9907356737935098 0.8306167770188012,-1.8092745167883566 c1.6991927752557445,-3.4649867295578654 2.4059244575717003,-7.179469067667701 2.0598053768280944,-10.826314975243394 c-0.28469415913606605,-2.9963628894284375 -0.8219896812874052,-4.88638702226266 -2.1747182919702888,-7.651543746089687 c-0.9075704709428528,-1.855170666079383 -0.9496706981120652,-2.1426254958494955 -0.4220375231798895,-2.889731986188384 c0.5017518877379877,-0.7101825206085138 1.7540611041074219,-0.8254405195799636 2.412135966498305,-0.22188890221150354 c0.45620082227621733,0.41824160105807523 1.87449536051771,3.380441191390185 2.4217983137174683,5.057548601573556 c1.8116901035931476,5.5510184774094045 1.5352779563592218,11.509926040999208 -0.7867911307033097,16.96294071089995 c-1.1891588756156164,2.7934535978260056 -2.024261742414743,3.657198422453367 -3.2034131869819404,3.3141850961730643 zm-6.367486817428716,-3.275880791125667 c-0.4907092052018011,-0.221198734552992 -0.9130918122109466,-0.7402048137537718 -1.02800472735314,-1.2633518989056214 c-0.07005201733893505,-0.3185123744031381 0.0503822390713523,-0.6708429640733484 0.6328837428552061,-1.8503394924698013 c2.1388295737276812,-4.331147140990018 2.1616051064585666,-8.502865552863838 0.0703971011681909,-12.733593299540406 c-0.9182680696497838,-1.8579313367134298 -0.9382829317466224,-2.2278612016756876 -0.16184431592098789,-2.960474171185831 c0.3833881343032357,-0.3616478530601179 0.5462677017119907,-0.42548836147244795 1.0845984753510975,-0.42548836147244795 c0.9027392973332714,0 1.3713631374626987,0.4537852354714264 2.1781691302628468,2.1112228673872147 c1.240921450003992,2.5491342467128724 1.7488848466685853,4.760776508413536 1.7447438407175149,7.594259830433217 c-0.00448608978032589,2.9125075189192695 -0.4793214388363584,4.911923225627593 -1.8051335108372863,7.600126255530568 c-0.7595295081920986,1.5390738784810358 -1.1346356305931942,1.9455826293444125 -1.8948553064438043,2.0497979457796762 c-0.23189633325992293,0.03174771229153707 -0.6011360305636693,-0.02346570038939698 -0.8209544297996375,-0.12215967555656652 zm-5.941308288297755,-3.051576302109372 c-0.388909475571329,-0.1608090644332204 -0.8326872799943361,-0.6898225746824195 -0.9648543865993221,-1.1498193190804509 c-0.1470057112629869,-0.5138298217619423 -0.02657145485269951,-0.9217189079423421 0.5569653004189219,-1.8813970371028268 c0.7505573286314469,-1.2343648572481312 0.9255148300641566,-1.8965807255900837 0.9255148300641566,-3.5098476273611237 c0,-1.6129218179417852 -0.17495750143270974,-2.2754827701129927 -0.9255148300641566,-3.5098476273611237 c-0.25432678216155236,-0.41858668488733125 -0.5096888158108722,-0.9196484049668072 -0.5676628991258529,-1.1139306008378438 c-0.24190376430834218,-0.813707669385265 0.4358408763501231,-1.8106548521053802 1.3465171017562785,-1.9814713475870196 c0.7716074422160528,-0.1449352082874519 1.302001287782275,0.1994584533098742 2.011493640732277,1.3075226290503688 c2.054629119389257,3.2068640252744993 2.054284035560001,7.4914248493149795 -0.0010352514877675135,10.671372335907522 c-0.725021125266515,1.121867528910728 -1.5335525372129424,1.5183688487256854 -2.3814235056945354,1.1674185943724984 v0 " stroke-width="0"/></g></g></g></svg>
			</div>
		</div>
    <div class="cardNumber">
			<span>2134</span>
			<span>2031</span>
			<span>1234</span>
			<span>3412</span>
		</div>
		<div class="exp">
			<span>
				EXP <br/>END
			</span>
			<span class="numbers">
				01/20
			</span>
		</div>
		<div class="accountNumber">
			123-456-789
		</div>
		<div class="masterCard">
			
		</div>
  </div>
</div>
            
          
!
            
              *{
	box-sizing: border-box;
	-webkit-box-sizing: border-box;
}

body{
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100vh;
	background:#14233c;
}

.phone{
	height: 440px;
	width: 260px;
	position: relative;
	border-radius: 2%;
	border: 10px solid white;
	border-bottom-width: 40px;
	transition: transform 0.5s cubic-bezier(0.43, -0.37, 0, 1);
	svg{
		width: 100%;
		height: 100%;
		fill: white;
	}
	.logo{
		position: absolute;
		width: 40%;
		height: 30%;
		top:-25%;
		bottom: 0;
		left:0;
		right:0;
		margin: auto;
	}
	.joinButton{
		width: calc(100% - 5px);
		font-size: 16px;
		color:white;
		position: absolute;
		bottom: 10px;
		left: 0;
		right: 0;
		border: 1px solid white;
		padding: 10px;
		margin: auto;
		text-align: center;
		font-family: 'Roboto', sans-serif;
		font-weight: 300;
		letter-spacing: 0.02em;
		transition: all 0.3s ease-in-out;
		cursor: pointer;
		&:hover{
			background: white;
			color: #14233c;
		}
	}
}

.joinClicked .phone{
	transform: scale(0);
}

.envelope{
	width: 500px;
	height: 220px;
	background: white;
	border-radius: 4px;
	position: absolute;
	z-index: 10;
	transform: translatex(2000px) translatey(0);
	opacity: 0;
	transition: all 0.7s cubic-bezier(0.77, 0.15, 0.37, 1.32) 0.5s;
	cursor: pointer;
	z-index: 105;
	&:after{
		content:'';
		display: block;
		z-index: 110;
		height: 0px;
		width: 0px;
		border-style: solid;
		border-width: 0 250px 110px 250px;
		border-color: transparent transparent #ffffff transparent;
		// top: -192px;
		top: 0;
		position: relative;
		z-index: -1;
		transition: all 0.6s ease-out;
	}
	span{
		font-family: 'Roboto', sans-serif;
		font-weight: 300;
		letter-spacing: 0.02em;
		padding: 20px 0 0 20px;
		display: block;
		font-size: 18px;
	}
}

.joinClicked .envelope{
	transform: translatex(0px) translatey(0);
	opacity: 1;
	animation: shake 1s infinite 2.5s;
}

@keyframes shake {
	0%   { transform: rotate(0deg) translatex(0px) translatey(0);  }
	15%   { transform: rotate(2deg) translatex(-2px) translatey(0); }
	30%   { transform: rotate(-2deg) translatex(2px) translatey(0); }
	50%   { transform: rotate(0deg) translatex(0px) translatey(0); }
}

.enveClicked .envelope{
	transition: all 2s ease-out 1s;
	animation: none;
	opacity: 0;
	visibility: hidden;
}
.enveClicked .envelope:after{
	top: -192px;
}

.cardWrapper{
	position: absolute;
	width: 360px;
	height: 200px;
	z-index: 100;
	border-radius: 10px;
	transform: translateZ(0);
	perspective: 500px;
	transition: opacity 0.7s linear 0.7s;
	transform: translatex(2000px);
	opacity: 0;
	*{
		transition: all 0.2s ease-out;
	}
	a {
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		z-index: 2;
		width: calc(100% / 3);
		height: calc(100% / 3);
		cursor: pointer;
		color: transparent;
		// background: rgba(white, .1);
		// border: 2px solid rgba(white, .5);
		// color: white;
		&:hover, &:focus {
			transform: translateZ(20px);
			~ div {
				span {
					transform: translateZ(20px);
				}
			}
		}
		&:active {
			outline: none;
			~ div {
				background: $green;
			}
		}
		&:nth-child(1) {
			top: 0;
			left: 0;
			&:after {
				content: "1";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: right bottom;
					transform: rotateX(5deg) rotateY(-5deg) translateZ(0);
				}
			}
		}
		&:nth-child(2) {
			top: 0;
			left: calc(100% / 3);
			&:after {
				content: "2";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: center bottom;
					transform: rotateX(5deg) translateZ(0);
				}
			}
		}
		&:nth-child(3) {
			top: 0;
			right: 0;
			&:after {
				content: "3";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: left bottom;
					transform: rotateX(5deg) rotateY(5deg) translateZ(0);
				}
			}
		}
		&:nth-child(4) {
			top: calc(100% / 3);
			left: 0;
			&:after {
				content: "4";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: right center;
					transform: rotateY(-5deg) translateZ(0);
				}
			}
		}
		&:nth-child(5), &:nth-child(6), &:nth-child(7), &:nth-child(8) {
			width: calc(100% / 6);
			height: calc(100% / 6);
		}
		&:nth-child(5) {
			top: calc(100% / 3);
			left: calc(100% / 3);
			&:after {
				content: "5";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: right bottom;
					transform: rotateX(2.5deg) rotateY(-2.5deg) translateZ(0);
				}
			}
		}
		&:nth-child(6) {
			top: calc(100% / 3);
			left: calc(100% / 6 * 3);
			&:after {
				content: "6";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: left bottom;
					transform: rotateX(2.5deg) rotateY(2.5deg) translateZ(0);
				}
			}
		}
		&:nth-child(7) {
			top: calc(100% / 6 * 3);
			left: calc(100% / 3);
			&:after {
				content: "7";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: right top;
					transform: rotateX(-2.5deg) rotateY(-2.5deg) translateZ(0);
				}
			}
		}
		&:nth-child(8) {
			top: calc(100% / 6 * 3);
			left: calc(100% / 6 * 3);
			&:after {
				content: "8";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: left top;
					transform: rotateX(-2.5deg) rotateY(2.5deg) translateZ(0);
				}
			}
		}
		&:nth-child(9) {
			top: calc(100% / 3);
			right: 0;
			&:after {
				content: "9";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: left center;
					transform: rotateY(5deg) translateZ(0);
				}
			}
		}
		&:nth-child(10) {
			bottom: 0;
			left: 0;
			&:after {
				content: "10";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: right top;
					transform: rotateX(-5deg) rotateY(-5deg) translateZ(0);
				}
			}
		}
		&:nth-child(11) {
			bottom: 0;
			left: calc(100% / 3);
			&:after {
				content: "11";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: center top;
					transform: rotateX(-5deg) translateZ(0);
				}
			}
		}
		&:nth-child(12) {
			bottom: 0;
			right: 0;
			&:after {
				content: "12";
			}
			&:hover, &:focus {
				~ div {
					transform-origin: left top;
					transform: rotateX(-5deg) rotateY(5deg) translateZ(0);
				}
			}
		}
	}
	.card{
		background: #fe4521;
		width: 360px;
		height: 200px;
		padding: 40px;
		border-radius: 5px;
		position: relative;
		.logo{
			width: 145px;
			position: absolute;
			top: 5px;
			right: 5px;
			height: 30px;
			text-align: right;
			span{
				color: white;
				font-size: 17px;
				font-family: 'Roboto', sans-serif;
				letter-spacing: 0.08em;
				position: absolute;
				right: 7px;
				font-weight: 600;
				top: 25px;
				opacity: 0.2;
			}
			svg{
				width: 100%;
				height: 100%;
			}
		}
		.chipWrapper{
			position: relative;
			top: 10px;
			.chip{
				width: 40px;
				height: 40px;
				border-radius: 5px;
				display: inline-block;
				vertical-align: top;
				border: 3px solid #FFD700
			}
			.contactless{
				width: 40px;
				height: 40px;
				margin-left: 10px;
				display: inline-block;
				vertical-align: top;
				position: relative;
				padding-top: 2px;
				padding-left: 6px;
			}
		}
		.cardNumber{
			color:white;
			position: absolute;
			bottom:70px;
			left:0;
			right:0;
			text-align: center;
			font-size: 26px;
			font-family: 'Roboto', sans-serif;
			text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
			letter-spacing: 0.02em;
			span:not(:last-of-type){
				margin-right: 7px;
			}
		}
		.exp{
			position: absolute;
			bottom: 40px;
			left: 140px;
			font-size: 8px;
			line-height: 6px;
			color:white;
			letter-spacing: 0.02em;
			font-family: 'Roboto', sans-serif;
			text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
			span{
				opacity: 0.5;
				&.numbers{
					font-size: 16px;
					position: relative;
					top: -2px;
					margin-left: 3px;
					opacity: 1;
				}
			}
		}
		.accountNumber{
			position: absolute;
			bottom: 15px;
			left: 25px;
			font-size: 16px;
			color:white;
			letter-spacing: 0.02em;
			font-family: 'Roboto', sans-serif;
			text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
		}
		.masterCard{
			position: absolute;
			width: 70px;
			height: 50px;
			right: 30px;
			bottom: 10px;
			&:after{
				content:'';
				position: absolute;
				height: 40px;
				width: 40px;
				border-radius: 50%;
				border: 2px solid white;
				right: 0;
				top: 2px;
			}
			&:before{
				content:'';
				position: absolute;
				height: 40px;
				width: 40px;
				border-radius: 50%;
				border: 2px solid white;
				left: 0;
				top: 2px;
			}
		}
	}
}

.joinClicked .cardWrapper{
	transform: translatex(0);
}

.enveClicked .cardWrapper{
	opacity: 1;
}
            
          
!
            
              // Couldn't think of a better way of doing this, I want to change it :/

jQuery(".joinButton").click(function(){
	jQuery("body").addClass("joinClicked");
})

jQuery(".envelope").click(function(){
	jQuery("body").addClass("enveClicked");
})
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console