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

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="poster">
	<div class="lens-flare"></div>
	<div class="stripes">
		<div class="stripe-block str1">
			<div></div>
			<div></div>
			<div></div>
			<div></div>
		</div>
		<div class="stripe-block str2">
			<div></div>
			<div></div>
			<div></div>
			<div></div>
		</div>
		<div class="stripe-block str3">
			<div></div>
			<div></div>
			<div></div>
			<div></div>
		</div>
	</div>
	<div class="info">

		<header>
			<h3>Codepen</h3>
			<p>Presents</p>
		</header>

		<main>
			<svg id="text-1" viewBox="0 0 450 100">
				<rect mask="url(#knockout-text-1)" />

				<mask id="knockout-text-1">
					<rect />
					<text x="50%" y="80" text-anchor="middle">Summer</text>
				</mask>
			</svg>

			<svg id="text-2" viewBox="0 0 450 100">
				<rect mask="url(#knockout-text-2)" />

				<mask id="knockout-text-2">
					<rect />
					<text x="50%" y="80" text-anchor="middle">Lounge</text>
				</mask>
			</svg>
		</main>

		<section id="date">
			<div class="circle-item">22</div>
			<div class="circle-item">Jan</div>
			<div class="circle-item">2022</div>
		</section>

		<section id="talent">
			<div class="dj-title">Featuring</div>
			<ul class="dj-list">
				<li>DJ Coyier</li>
				<li>//</li>
				<li>DJ Kuhn</li>
				<li>//</li>
				<li>D-Jhey</li>
			</ul>
		</section>

		<footer>
			<div class="tickets">
				$25 Pre Sale Tickets / 18+ Ages / $30 at Door
			</div>
			<div class="venue">
				<h3>Club Sicontis</h3>
				<p>Level 2, 48 Fort Street, AKL</p>
				<p><small>www.clubsicontis.com</small></p>
			</div>
		</footer>

	</div>
</div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Catamaran:[email protected]&family=PT+Sans+Narrow&display=swap");

*,
::before,
::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	min-height: 100vh;
	display: grid;
	place-items: center;

	--white: #e9e9e9;

	background-color: lavender;
	background-image: url("https://www.transparenttextures.com/patterns/black-paper.png");
}

ul {
	list-style: none;
}

.poster {
	height: 90vh;
	max-width: 700px;
	width: 100%;
	background-image: url("trees-bkg.jpg");
	background-image: url("https://www.sicontis.com/codepen/cpc-knockout-text/trees-bkg.jpg");
	background-size: cover;
	background-position-y: -100px;
	background-repeat: no-repeat;
	position: relative;
	font-family: "PT Sans Narrow", sans-serif;
	overflow: hidden;
	box-shadow: rgb(38, 57, 77) 0px 20px 30px -10px;
	border: 10px solid rgb(34, 33, 33);
}

.lens-flare {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	background-image: linear-gradient(
			45deg,
			rgba(72, 33, 24, 0.2) 0%,
			rgba(72, 33, 24, 0.2) 36%,
			rgba(107, 68, 41, 0.2) 36%,
			rgba(107, 68, 41, 0.2) 51%,
			rgba(141, 103, 58, 0.2) 51%,
			rgba(141, 103, 58, 0.2) 64%,
			rgba(176, 137, 74, 0.2) 64%,
			rgba(176, 137, 74, 0.2) 76%,
			rgba(210, 172, 91, 0.2) 76%,
			rgba(210, 172, 91, 0.2) 100%
		),
		linear-gradient(
			135deg,
			rgba(16, 29, 192, 0.2) 0%,
			rgba(16, 29, 192, 0.2) 40%,
			rgba(61, 43, 200, 0.2) 40%,
			rgba(61, 43, 200, 0.2) 41%,
			rgba(107, 57, 208, 0.2) 41%,
			rgba(107, 57, 208, 0.2) 47%,
			rgba(152, 70, 215, 0.2) 47%,
			rgba(152, 70, 215, 0.2) 88%,
			rgba(198, 84, 223, 0.2) 88%,
			rgba(198, 84, 223, 0.2) 91%,
			rgba(243, 98, 231, 0.2) 91%,
			rgba(243, 98, 231, 0.2) 100%
		),
		linear-gradient(
			90deg,
			rgb(255, 136, 53) 0%,
			rgb(255, 136, 53) 10%,
			rgb(246, 113, 64) 10%,
			rgb(246, 113, 64) 12%,
			rgb(236, 89, 75) 12%,
			rgb(236, 89, 75) 24%,
			rgb(227, 66, 87) 24%,
			rgb(227, 66, 87) 29%,
			rgb(217, 42, 98) 29%,
			rgb(217, 42, 98) 40%,
			rgb(208, 19, 109) 40%,
			rgb(208, 19, 109) 100%
		);
	mix-blend-mode: hard-light;
	opacity: 0.7;
}

.stripes {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	position: relative;
}

.stripe-block {
	position: absolute;
	height: 700px;
	width: 300px;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	opacity: 0.3;
}
.stripe-block div {
	border-right: 1px solid var(--white);
	opacity: 0.5;
}

.str1 {
	transform: translate(-200px, -100px) rotateZ(-45deg);
}
.str2 {
	bottom: 0;
	right: 0;
	transform: translate(30%, 60%) rotateZ(-45deg);
}
.str3 {
	top: 0;
	right: 0;
	transform: translate(60%, -40%) rotateZ(45deg);
}

.info {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 3;
	display: grid;
	justify-items: center;
	color: var(--white);
}

/* HEADER 
---------------------- */
.info header {
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 4px;
	padding: 2em;
}
.info header h3 {
	font-size: 2rem;
	font-weight: normal;
}

/* MAIN 
---------------------- */
.info main {
	text-align: center;
}

svg#text-1 {
	width: 450px;
	height: 100px;
}
svg#text-2 {
	width: 300px;
	height: 80px;
}
svg rect {
	width: 100%;
	height: 100%;
	fill: var(--white);
}
svg text {
	font-size: 6rem;
	text-transform: uppercase;
	font-family: "Catamaran", sans-serif;
	fill: #000;
}

/* SECTIONS 
---------------------- */
section#date {
	display: grid;
	grid-template-columns: repeat(3, 80px);
	grid-column-gap: 10px;
}
.circle-item {
	width: 80px;
	height: 80px;
	display: grid;
	place-items: center;
	text-transform: uppercase;
	font-size: 1.75rem;
	border: 2px solid var(--white);
	opacity: 0.8;
	border-radius: 50%;
	mix-blend-mode: overlay;
}

section#talent {
	padding: 10px;
}
.dj-title {
	padding: 2px 5px;
	text-transform: uppercase;
	background-color: var(--white);
	color: #000;
	letter-spacing: 2px;
	width: min-content;
	margin: 0 auto;
	mix-blend-mode: screen;
}
.dj-list {
	margin-top: 10px;
	display: grid;
	grid-template-columns: repeat(
		min-content,
		20px,
		min-content,
		20px,
		min-content
	);
	grid-auto-flow: column;
}
.dj-list li {
	text-transform: uppercase;
	font-size: 1.5rem;
	padding: 0 5px;
	letter-spacing: 2px;
}

/* FOOTER 
---------------------- */
footer {
	padding: 10px;
}
.tickets {
	padding: 5px 0;
	text-transform: uppercase;
	font-weight: bold;
	letter-spacing: 1px;
	border-top: 1px solid var(--white);
	border-bottom: 1px solid var(--white);
}
.venue {
	padding: 1em;
	text-align: center;
	text-transform: uppercase;
}
.venue h3,
.venue p {
	letter-spacing: 2px;
}

@media screen and (max-width: 600px) {
	.poster {
		height: 100vh;
		background-position-y: 0px;
	}

	.info header h3 {
		font-size: 1.4rem;
	}

	svg#text-1 {
		width: 360px;
		height: 70px;
	}
	svg#text-2 {
		width: 240px;
		height: 60px;
	}

	section#date {
		grid-template-columns: repeat(3, 60px);
	}
	.circle-item {
		width: 60px;
		height: 60px;
		font-size: 1.3rem;
	}
	.dj-title,
	.tickets,
	.venue {
		font-size: 0.9rem;
	}
	.dj-list li {
		font-size: 1.2rem;
	}
}

              
            
!

JS

              
                // Inspired by this Pin
// https://www.pinterest.nz/pin/117797346494620639/

              
            
!
999px

Console