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

              
                <h1>CREDIT CARD</h1>
<div class="cards">
<div class="card front">
		<span class="number">1234 5678 9012 3456</span>
		<span class="name">PINK FLOYD</span>
		<span class="expiration">06/30/2112</span>
<img class="logo" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/MasterCard_Logo.svg/2000px-MasterCard_Logo.svg.png">
</div>
<div class="card back">
	
	<div class="mag-stripe"></div>
	<div class="signature front">See ID <span class="security_code">123</span></div>
	<img class="logo back" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/MasterCard_Logo.svg/2000px-MasterCard_Logo.svg.png">
	<span class="front_part">
	<span class="number">1234 5678 9012 3456</span>
		<span class="name">PINK FLOYD </span>
		<span class="expiration">06/30/2112</span></span>
		</div>
</div>
<div class="buttons"><h2>Highlight:</h2><button id="Number" data-title="number">Number</button><button id="Exp" data-title="expiration">Expiration Date</button><button id="Name" data-title="name">Name</button><button id="Sec" data-title="security_code">Security Code</button></div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Gloria+Hallelujah');
$inch: 110px;
$color: #003876;
body {
	background: #333;
	display: flex; align-items: center;
	justify-content: center;
	min-height: 100vh;
	flex-direction: column;
}
.cards {position:relative; width:2*(4*$inch);
	display:block;

	display: flex;
	margin:15px auto;
}
h1 {
	color: #bababa;
	font-size: 5em;
	letter-spacing: 4px;
	margin: 0;
	text-align: center;
	text-shadow: 2px 2px 2px #000, -2px -2px 1px #fff;
	width: 100%;
}
h2{@extend h1; font-size:3em;}
.card {display:inline-block; margin:10px;
	background: linear-gradient(135deg, $color 0%,darken(rgba(37,141,200,0.8),15%) 100%);
	border-radius: 10px;
	font-family: sans-serif;
	height: 2.125*$inch;
	min-height: 2.125*$inch;
	min-width: 3.375*$inch;
	position: relative;
	width: 3.375*$inch;
	&.front {
		background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/237800/dsotm_copy.jpg") center center / cover;
		padding: 20px;
	}
	&.back {
		padding: 20px 20px;
	}
	box-shadow: 2px 2px 5px #000;
}
.number {
	bottom: 30%;
	color: #bababa;
	font-size: 1.5em;
	letter-spacing: 4px;
	position: absolute;
	text-align: center;
	text-shadow: 1px 1px 2px #000, -1px -1px 1px #fff;
	width: calc(100% - 40px);
}
.name {
	bottom: 10%;
	color: #bababa;
	letter-spacing: 3px;
	position: absolute;
	text-shadow: 1px 1px 2px #000, -1px -1px 1px #fff;
}
.expiration {
	bottom: 18%;
	color: #bababa;
	letter-spacing: 4px;
	position: absolute;
	right: 35%;
	text-shadow: 1px 1px 2px #000, -1px -1px 1px #fff;
	&:before {
		color: transparentize(#fff,0.6);
		content: "VALID THRU";
		display: inline-block;
		font-size: 0.01em;
		letter-spacing: 1px;
		line-height: 1em;
		text-shadow: none;
		vertical-align: middle;
		width: 35px;
	}
}
.mag-stripe {
	background: #000;
	height: 15%;
	left: 0;
	position: absolute;
	top: 25px;
	width: calc(100%);
}
.card.back {
}
.front_part {
	display: block;
	height: calc(100% - 20px);
	left: 0;
	padding: 0;
	position: absolute;
	top: 20px;
	transform: rotateY(180deg);
	width: calc(100% - 20px);
}
.back .number {
	bottom: 30%;
	color: $color;
	font-size: 1.5em;
	letter-spacing: 4px;
	position: absolute;
	text-align: center;
	text-shadow: -1px 1px 2px #333, -1px 1px 1px #000;
	width: calc(100% - 40px);
}
.back .name {
	bottom: 10%;
	color: $color;
	fill: transparent;
	letter-spacing: 3px;
	position: absolute;
	text-shadow: -1px 1px 2px #333, -1px 1px 1px #000;
}
.back .expiration {
	bottom: 18%;
	color: $color;
	letter-spacing: 4px;
	mix-blend-mode: screen;
	position: absolute;
	right: 35%;
	text-shadow: -1px 1px 2px #333, -1px 1px 1px #000;
	&:before {
		content: '';
	}
}
.signature {
	background: #aaa;
	font-family: 'Gloria Hallelujah', cursive;
	font-size: 40px;
	height: 15%;
	line-height: 40px;
	padding-left: 10px;
	position: absolute;
	right: 20px;
	top: 35%;
	vertical-align: middle;
	width: 65%;
	& .security_code {
		background: #fff;
		content: "123";
		font-family: sans-serif;
		font-size: 0.4em;
		font-style: italic;
		height: 100%;
		padding: 0 5px;
		position: absolute;
		right: 0px;
	}
}
.logo {
	bottom: 10px;
	height: 20%;
	position: absolute;
	right: 10px;
}
.logo.back {
	background: #eee;
	border-radius: 50% / 100%;
	filter: grayscale(100%);
	left: 5px;
	opacity: 0.4;
	padding: 5px;
	top: 40%;
}

.highlight{ &:after{content:''; position:absolute; border:3px solid red; width:100%; height:100%; right:50%; padding:10px; bottom:50%; transform:translatex(50%) translatey(50%); border-radius:100%; transition:all 300ms;}}
.buttons{text-align:center;}
button{background:none; border:2px solid #aaa; color:#fff; font-size:1.2em; padding:0.5em; margin:5px; text-align:center; box-shadow:1px 1px 5px #000;}

              
            
!

JS

              
                $("button").click(function(){var select = $(this).attr("data-title"); $(".highlight").removeClass("highlight"); $(".front ." + select).addClass("highlight");})

jackHarnerSig("light")
              
            
!
999px

Console