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 id="symbol">
	<div class="line">
		<h1>impossible trident</h1>
		<div class="shadow"></div>
	</div>
	<div class="line">
		<div class="shadow"></div>
	</div>
	<div class="line">
		<div class="shadow"></div>
	</div>
	<div class="line">
		<div class="shadow"></div>
	</div>
	<div class="line">
		<div class="shadow"></div>
	</div>
	<div class="line">

		<p>hover me!</p>
	</div>
</div>
<div class="range-wrap">
	<h2>Animation Timing</h2>
	<input type="range" class="range" min="0.25" max="1.25" step="0.25" value="0.75">
	<output class="bubble"></output>
</div>

<h2 id="cta"><a href="https://codepen.io/jackiezen/pen/WNxRZWY" target="_blank">See it in action</a></h2>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Work+Sans:wght@300&display=swap");

:root {
	--line-size: 4px;
	--symbol-width: 200px;
	
	--symbol-height: calc(var(--symbol-width) * 2);
	--gradient: linear-gradient(#daa8cd, #daa8cc, #9696c8);
	--yellow-color: #efc66a;
	--neon-color: #fff;
	--neon-glow: #fff;
	--neon-shadow: 0 0 1rem var(--neon-color), inset 0 0 1rem var(--neon-color),
		0 0 2rem var(--neon-glow), inset 0 0 4rem var(--neon-glow),
		0 0 4rem var(--neon-glow);
	--animation-time: 0.5s;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	transition: all calc(var(--animation-time) * 2) linear;
}

*:before,
*:after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	position: absolute;
	content: "";
	transition: all calc(var(--animation-time) * 2) linear;
	background: inherit;
}

body {
	width: 100%;
	height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background: var(--gradient);
	font-family: "Bebas Neue", sans-serif;
	position: relative;
}

#symbol {
	width: var(--symbol-width);
	height: var(--symbol-height);
	position: relative;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	transform-origin: center center;
	transform: skewY(-18deg);
	cursor: pointer;
	margin-bottom: calc(var(--line-size) * 20);
}

#symbol .line {
	width: var(--line-size);
	height: var(--symbol-height);
	background: var(--neon-color);
	position: relative;
	border-radius: var(--line-size);
	box-shadow: var(--neon-shadow);
}

#symbol .line h1,
#symbol .line p {
	position: absolute;
	color: var(--neon-color);
	white-space: nowrap;
}

#symbol .line p {
	right: 0;
	bottom: 0;
	font-size: calc(var(--line-size) * 3.5);
	letter-spacing: calc(var(--line-size) * 0.8);
	line-height: 1;
	margin-bottom: calc(var(--line-size) * -6);
	opacity: 1;
	transition-delay: calc(var(--animation-time) * 1);
}

#symbol .line h1 {
	right: 0;
	top: 0;
	font-size: calc(var(--line-size) * 6);
	letter-spacing: calc(var(--line-size) * 1);
	line-height: 1;
	margin-right: calc(var(--line-size) * 2);
	transition-delay: calc(var(--animation-time) * 1);
	transform: rotate(-90deg);
	transform-origin: right bottom;
	margin-top: calc(var(--line-size) * -6);
}

#symbol:hover .line p {
	opacity: 0;
	transition: all calc(var(--animation-time) * 1);
}

#symbol .line:before,
#symbol .line:after {
	box-shadow: var(--neon-shadow);
}

#symbol:hover > .line:last-of-type,
#symbol > .line:first-of-type,
#symbol:hover > .line:nth-of-type(2) {
	top: 0;
	height: calc(var(--symbol-height) - calc(var(--symbol-width) / 5));
}

/* SETUP */
#symbol > .line:first-of-type:after,
#symbol > .line:last-of-type:after {
	height: var(--line-size);
	bottom: 0;
}

#symbol > .line:first-of-type:before,
#symbol > .line:last-of-type:before,
#symbol > .line:nth-of-type(5):before {
	height: var(--line-size);
	width: calc(var(--symbol-width) / 5);
	top: 0;
}

#symbol > .line:nth-of-type(5):before {
	right: calc(calc(var(--symbol-width) / 5) * 1);
}

#symbol > .line:last-of-type:before,
#symbol > .line:last-of-type:after,
#symbol > .line:nth-of-type(3):before {
	right: 0;
}

/* FLAT */

#symbol:hover > .line:first-of-type:after,
#symbol > .line:last-of-type:after {
	transform: rotate(0deg);
	width: 0;
}

/* ANGLED */

#symbol > .line:first-of-type:after,
#symbol:hover > .line:last-of-type:after,
#symbol > .line:nth-of-type(4):before,
#symbol:hover > .line:nth-of-type(3):before {
	width: calc(calc(var(--symbol-width) / 5) * 1.4);
	height: var(--line-size);
	bottom: 0;
}

#symbol > .line:first-of-type:after,
#symbol > .line:nth-of-type(4):before {
	transform-origin: bottom left;
	transform: rotate(45deg);
}

#symbol:hover > .line:last-of-type:after,
#symbol:hover > .line:nth-of-type(3):before {
	transform-origin: bottom right;
	transform: rotate(-45deg);
	right: 0;
}

#symbol:hover > .line:nth-of-type(4):before,
#symbol:hover > .line:nth-of-type(4):after,
#symbol > .line:nth-of-type(3):after,
#symbol > .line:nth-of-type(3):before {
	width: 0;
	height: var(--line-size);
	bottom: 0;
}

#symbol:hover > .line:nth-of-type(3):after,
#symbol > .line:nth-of-type(4):after {
	width: calc(var(--symbol-width) / 5);
	height: var(--line-size);
	bottom: 0;
}

#symbol:hover > .line:nth-of-type(3):after {
	transform-origin: bottom left;
	left: 0;
}

#symbol > .line:nth-of-type(4):after {
	right: 0;
	transform-origin: bottom right;
}

#symbol:hover {
	transform: skewY(18deg);
}

#symbol > .line:nth-of-type(3),
#symbol > .line:nth-of-type(5),
#symbol:hover > .line:nth-of-type(4) {
	height: calc(var(--symbol-height) - calc(var(--symbol-width) / 5));
}

#symbol > .line:nth-of-type(4),
#symbol:hover > .line:nth-of-type(3) {
	height: calc(var(--symbol-height) - calc(calc(var(--symbol-width) / 5)) * 2);
}

#symbol:hover > .line:nth-of-type(5),
#symbol:hover > .line:first-of-type {
	height: var(--symbol-height);
}

#symbol > .line:nth-of-type(2):after,
#symbol:hover > .line:nth-of-type(5):after {
	height: var(--line-size);
	width: calc(calc(var(--symbol-width) / 5) * 4);
	bottom: 0;
}

#symbol:hover > .line:nth-of-type(5):after,
#symbol > .line:nth-of-type(5):after {
	right: 0;
}

#symbol > .line:nth-of-type(5):after,
#symbol:hover > .line:nth-of-type(2):after {
	height: var(--line-size);
	width: calc(calc(var(--symbol-width) / 5) * 2);
	bottom: 0;
}

#symbol .line .shadow {
	position: absolute;
	width: calc(calc(var(--symbol-width) / 5) - calc(var(--line-size) * 1));
	display: flex;
	top: 0;
	margin-left: var(--line-size);
	margin-top: var(--line-size);
	transform-origin: bottom left;
	padding: 0;
	height: calc(var(--symbol-height) - calc(var(--symbol-width) / 5));
	transition: opacity calc(var(--animation-time) * 1) linear;
}

#symbol .line .shadow:before {
	top: 0;
	background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
	transform-origin: bottom left;
}

#symbol .line .shadow:after {
	bottom: 0;
	transform-origin: bottom left;
	background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
}

#symbol:hover .line .shadow {
	transition: opacity calc(var(--animation-time) * 1) linear
		calc(var(--animation-time) * 2);
}

#symbol:hover .line .shadow:before,
#symbol:hover .line .shadow:after,
#symbol .line:nth-of-type(4) .shadow:after,
#symbol .line:first-of-type .shadow:after {
	transition: opacity calc(var(--animation-time) * 2) linear
		calc(var(--animation-time) * 2);
}

#symbol .line .shadow:before,
#symbol .line .shadow:after,
#symbol:hover .line:nth-of-type(4) .shadow:after,
#symbol:hover .line:first-of-type .shadow:after {
	width: inherit;
	height: 50%;
	transition: opacity calc(var(--animation-time) * 1) linear;
}

#symbol .line:nth-of-type(4) .shadow,
#symbol .line:first-of-type .shadow {
	transform: skewY(45deg);
}

#symbol .line:nth-of-type(5) .shadow:after,
#symbol .line:nth-of-type(2) .shadow,
#symbol .line:first-of-type .shadow:before {
	transform: skewY(-45deg);
}

#symbol .line:first-of-type .shadow {
	height: calc(
		calc(var(--symbol-height) - calc(calc(var(--symbol-width) / 5)) * 1) -
			calc(var(--line-size) * 1.5)
	);
}

#symbol .line:nth-of-type(4) .shadow {
	height: calc(
		calc(var(--symbol-height) - calc(calc(var(--symbol-width) / 5)) * 2) -
			calc(var(--line-size) * 1.5)
	);
}

#symbol .line:nth-of-type(5) .shadow {
	height: calc(var(--symbol-height) - calc(var(--line-size) * 1.5));
}

#symbol:hover .line:nth-of-type(2) .shadow:after,
#symbol:hover .line:nth-of-type(5) .shadow:after {
	opacity: 1;
}

#symbol .line:nth-of-type(2) .shadow {
	height: calc(
		calc(var(--symbol-height) - calc(calc(var(--symbol-width) / 5)) * 1) -
			calc(var(--line-size) * 1.5)
	);
}

#symbol .line:nth-of-type(3) .shadow:after,
#symbol .line:nth-of-type(4) .shadow:before,
#symbol .line:nth-of-type(2) .shadow:before,
#symbol .line:nth-of-type(2) .shadow:after,
#symbol:hover .line:first-of-type .shadow:after,
#symbol .line:nth-of-type(5) .shadow:after,
#symbol:hover .line:nth-of-type(4) .shadow:after,
#symbol:hover .line:first-of-type .shadow:after {
	opacity: 0;
}

input[type="range"] {
	-webkit-appearance: none;
	width: 100%;
	background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
}

input[type="range"]:focus {
	outline: none;
}

input[type="range"]::-ms-track {
	width: 100%;
	cursor: pointer;
	background: transparent;
	border-color: transparent;
	color: transparent;
}

.range-wrap {
	position: relative;
	width: var(--symbol-width);
	display: flex;
	justify-content: center;
}

.range {
	width: 100%;
	background-color: linear-gradient(
		to right,
		#82cfd0 0%,
		#82cfd0 50%,
		#fff 50%,
		#fff 100%
	);
}

.range-wrap > h2 {
	top: calc(var(--line-size) * -6);
}

.bubble {
	transform: translateX(-50%);
	top: calc(var(--line-size) * 6);
	transition: transform 0s;
}

.range-wrap > h2,
.bubble,
h2#cta a {
	letter-spacing: calc(var(--line-size) * 0.8);
	color: var(--neon-color);
	font-size: calc(var(--line-size) * 4);
	white-space: nowrap;
}

.range-wrap > h2,
.bubble {
	position: absolute;
}

input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	height: calc(var(--line-size) * 4);
	width: calc(var(--line-size) * 4);
	border-radius: 50%;
	background: var(--neon-color);
	cursor: pointer;
	margin-top: calc(var(--line-size) * -1);
}

input[type="range"]::-moz-range-thumb,
input[type="range"]::-ms-thumb,
input[type="range"]::-webkit-slider-thumb {
	height: calc(var(--line-size) * 4);
	width: calc(var(--line-size) * 4);
	border-radius: 50%;
	background: var(--neon-color);
	cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
	width: 100%;
	height: 8.4px;
	cursor: pointer;
	background: var(--yellow-color);
	border-radius: var(--line-size);
}

input[type="range"]::-moz-range-track {
	width: 100%;
	height: 8.4px;
	cursor: pointer;
	background: var(--yellow-color);
	border-radius: var(--line-size);
}

input[type="range"]:focus::-webkit-slider-runnable-track {
	background: var(--yellow-color);
}

input[type="range"]::-ms-track {
	width: 100%;
	height: 8.4px;
	cursor: pointer;
	background: transparent;
	border-color: transparent;
	border-width: 16px 0;
	color: transparent;
}

input[type="range"]::-ms-fill-lower,
input[type="range"]:focus::-ms-fill-lower,
input[type="range"]::-ms-fill-upper,
input[type="range"]:focus::-ms-fill-upper {
	background: none;
}

h2#cta {
	bottom: calc(var(--line-size) * 5);
	position: absolute;
	height: auto;
}

h2#cta a {
	text-decoration: none;
}

h2#cta a::after {
	margin-left: 6px;
	display: inline-block;
	content: "\0279E";
	transition: transform 0.15s ease-in;
}

h2#cta a:hover::after {
	transform: translateX(3px);
}

              
            
!

JS

              
                $(document).ready(function () {
	const allRanges = document.querySelectorAll(".range-wrap");
	allRanges.forEach((wrap) => {
		const range = wrap.querySelector(".range");
		const bubble = wrap.querySelector(".bubble");

		range.addEventListener("input", () => {
			setBubble(range, bubble);
		});
		setBubble(range, bubble);
	});

	function setBubble(range, bubble) {
		const val = range.value;
		const min = range.min ? range.min : 0;
		const max = range.max ? range.max : 100;
		const newVal = Number(((val - min) * 100) / (max - min));
		bubble.innerHTML = val + "s";
		$(":root")
			.get(0)
			.style.setProperty("--animation-time", val + "s");

		// Sorta magic numbers based on size of the native UI thumb
		bubble.style.left = `calc(${newVal}% + (${8 - newVal * 0.15}px))`;
	}
});

              
            
!
999px

Console