HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div class="maintitle">
BACK<span class="arrow"><</span>
<div class="line">
<div class="small-container">
<div>TO</div>
<div>THE</div>
</div>
FUTURE
</div>
</div>
<div class="background container">
<div class="lines-container"><div class="lines"></div></div>
<div class="delorean">
<div class="delorean-shadow"></div>
<div class="delorean-top">
<div class="left">
<div class="window"></div>
<div class="light-container">
<div class="light"></div>
</div>
</div>
<div class="right">
<div class="window"></div>
<div class="light-container">
<div class="light"></div>
</div>
</div>
<div class="license">
<span class="author">ManzDev</span>
<span class="title">OUTATIME</span>
</div>
</div>
<div class="turbines-container">
<div class="left turbine-container">
<div class="turbine">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div class="shape3d-container">
<div class="triangle"></div>
<div class="square"></div>
</div>
</div>
<div class="engine-container">
<div class="top">
<div class="arc">
<div class="input-engine-container">
<div class="intake"></div>
<div class="central"></div>
<div class="base"></div>
</div>
</div>
<div class="antenna-container">
<div class="top">
<div class="dot"></div>
</div>
</div>
</div>
<div class="bottom">
<div class="left pipe"></div>
<div class="right pipe"></div>
</div>
</div>
<div class="right turbine-container">
<div class="turbine">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div class="shape3d-container">
<div class="triangle"></div>
<div class="square"></div>
</div>
</div>
</div>
<div class="delorean-top-bottom"></div>
<div class="delorean-middle">
<div class="left">
<div class="top"></div>
<div class="middle">
<div class="detail"></div>
<div class="detail"></div>
<div class="detail"></div>
</div>
<div class="bottom"></div>
</div>
<div class="right">
<div class="top"></div>
<div class="middle">
<div class="detail"></div>
<div class="detail"></div>
<div class="detail"></div>
</div>
<div class="bottom"></div>
</div>
</div>
<div class="delorean-bottom">
<div class="left wheel"></div>
<div class="right wheel"></div>
</div>
<div class="left rearview"></div>
<div class="right rearview"></div>
<div class="delorean-pipelines">
<div class="left pipelines"></div>
<div class="right pipelines"></div>
<div class="extra">
<div class="left exhaust-pipe"></div>
<div class="sign"></div>
<div class="right exhaust-pipe"></div>
</div>
</div>
</div>
</div>
<div class="created">
<span>Created by</span>
<a href="https://manz.dev/"><h2>Manz.dev</h2></a>
<p>on <a href="https://twitch.tv/ManzDev">Twitch</a> / <a href="https://youtu.be/">Youtube</a></p>
</div>
@use postcss-nested;
@font-face {
font-family: "Montserrat";
src: url("https://manz.dev/assets/fonts/montserrat-vf.woff2") format("woff2"),
}
@font-face {
font-family: "Dosis";
src:
url("https://manzdev.github.io/twitch-delorean-css/fonts/dosis.woff2") format("woff2"),
url("https://manzdev.github.io/twitch-delorean-css/fonts/dosis.woff") format("woff"),
url("https://manzdev.github.io/twitch-delorean-css/fonts/dosis.ttf") format("truetype");
}
@font-face {
font-family: "Back to the Future 2002";
src:
url("https://manzdev.github.io/twitch-delorean-css/fonts/bttf.woff2") format("woff2"),
url("https://manzdev.github.io/twitch-delorean-css/fonts/bttf.woff") format("woff"),
url("https://manzdev.github.io/twitch-delorean-css/fonts/bttf.ttf") format("truetype");
}
:root {
--border-size: 13px;
--border-color: #8f756b;
}
html,
body {
height: 100%;
}
body {
margin: 0;
background: #335;
}
.background {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
height: 100%;
min-height: 325px;
padding-bottom: 50px;
box-sizing: border-box;
background-image:
linear-gradient(transparent 70%, #272636 70%, #16161d),
linear-gradient(to bottom, #352158, #884ced, #ec1cce, transparent 70%);
z-index: -5;
animation: back-move 3s linear infinite;
}
.maintitle {
position: absolute;
top:0;
left: 0;
transform-origin: 10% 20%;
transform: scale(0.5);
font-family: "Back to the Future 2002";
font-size: 6rem;
color: white;
background: linear-gradient(red, orange, gold);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
filter:
drop-shadow(4px 4px 0 #fff) drop-shadow(-4px -4px 0 #fff) drop-shadow(4px -4px 0 #fff) drop-shadow(-4px 4px 0 #fff) drop-shadow(2px 2px 4px #000);
& .small-container {
font-size: 3rem;
}
& .line {
display: flex;
}
}
.delorean {
--width: 550px;
--height: 340px;
width: var(--width);
min-width: var(--width);
height: var(--height);
position: absolute;
bottom: 20px;
animation: engine-move 0.1s infinite steps(5) alternate;
& .rearview {
background: #1d0b0c;
width: 55px;
height: 35px;
position: absolute;
border-radius: 0 0 0 25px;
top: 0;
transform: translate(25px, 58px);
&.right {
right: 0;
transform: translate(-25px, 58px) scaleX(-1);
}
}
& .delorean-top {
display: flex;
height: 155px;
position: relative;
z-index: 1;
& .left,
& .right {
width: 100%;
height: 100%;
background: black;
border: var(--border-size) solid var(--border-color);
border-bottom: 0;
border-radius: 10px 10px 0 0;
box-sizing: border-box;
transform: skewX(var(--sx)) translateX(var(--x));
display: flex;
flex-direction: column;
justify-content: flex-end;
overflow: hidden;
}
& .left {
--sx: -40deg;
--x: 65px;
border-right: 0;
border-left-width: 25px;
clip-path: polygon(0 0, 70% 0, 100% 100%, 0 100%);
}
& .right {
--sx: 40deg;
--x: -65px;
border-left: 0;
border-right-width: 25px;
clip-path: polygon(50% 0, 100% 0, 100% 100%, 0 100%);
}
& .window {
width: 100%;
height: 64px;
border-bottom: 15px solid var(--border-color);
}
& .light-container {
padding-top: 15px;
transform: skewX(calc(var(--sx) * -1)) scaleX(1.25);
& .light {
width: 140px;
height: 43px;
background:
repeating-linear-gradient(#0007, transparent 2px 14px),
repeating-linear-gradient(90deg, #0007, transparent 2px 20px),
linear-gradient(90deg, #F3BE7D 20px, #F29E49 20px 60px, #E4712B 60px 100px, #C42B2E 100px 140px)
}
}
& .right {
& .light-container {
transform: skewX(calc(var(--sx) * -1)) scaleX(-1.25);
}
}
& .license {
--size: 100px;
width: var(--size);
font-family: "Dosis";
font-variation-settings: "wght"550;
line-height: 110%;
height: 39px;
background: #e6e3bb;
border: 2px solid #f79c1e;
border-radius: 5px;
position: absolute;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
left: calc(50% - calc(var(--size) / 2));
text-align: center;
font-weight: bold;
clip-path: polygon(0 0, 100% 0, 100% 40%, 95% 50%, 100% 60%, 100% 100%, 0 100%, 0% 60%, 5% 50%, 0 40%);
& .author {
font-size: 0.9rem;
color: #c02d28;
}
& .title {
font-size: 1rem;
color: #2a487d;
}
}
}
& .turbines-container {
width: 350px;
height: 75px;
position: absolute;
transform: translate(100px, 10px);
top: 0;
z-index: 5;
display: flex;
justify-content: space-between;
align-items: flex-end;
& .turbine-container {
--x: 0px;
--y: 40px;
display: flex;
width: 120px;
height: 150px;
transform: translate(var(--x), var(--y));
&.right {
transform: scaleX(-1) translate(var(--x), var(--y));
}
& .turbine {
background: #8f756b;
width: 100%;
height: 100%;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(4, 1fr);
gap: 3px;
padding: 4px;
box-sizing: border-box;
&>div {
background: linear-gradient(to bottom, #000 65%, #433131 65%);
}
}
& .shape3d-container {
display: flex;
flex-direction: column;
width: 22px;
height: 100%;
& .triangle {
width: 100%;
height: 110px;
background: #433131;
clip-path: polygon(0 0, 100% 100%, 0 100%);
}
& .square {
width: 50%;
height: 44px;
background: #433131;
}
}
}
& .engine-container {
/* background: #ff000055; */
width: 135px;
height: 125px;
position: absolute;
transform: translateX(80%);
z-index: 10;
& .top {
width: 100%;
height: 75px;
display: flex;
justify-content: center;
margin-top: 20px;
& .arc {
width: 90%;
height: 100%;
border: 11px solid #1d0b0c;
border-bottom: 0;
border-radius: 15px 15px 0 0;
box-sizing: border-box;
& .input-engine-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
height: 100%;
& .intake {
width: 35%;
height: 8px;
background: linear-gradient(to right, #d4c3b2 20%, #c0a392 20% 80%, #644d4c 80%);
transform: translateY(8px);
}
& .central {
width: 100px;
height: 22px;
background: conic-gradient(from 122deg at 50% -50%,
transparent 0,
#413130 2deg 5deg, #000 8deg,
#413130 12deg, #000 15deg,
#413130 18deg, #000 21deg,
#BAABA5 26deg, #000 29deg,
#BAABA5 34deg, #000 37deg,
#BAABA5 42deg, #000 45deg,
#BAABA5 50deg, #000 53deg,
#BAABA5 58deg, #000 61deg,
#BAABA5 66deg, #000 69deg,
#BAABA5 74deg, #000 77deg,
#BAABA5 82deg, #000 85deg,
#BAABA5 90deg, #000 93deg,
#BAABA5 98deg, #000 101deg,
#BAABA5 106deg, #000 109deg,
#BAABA5 114deg 115deg,
transparent 116deg);
transform-origin: 50% 100%;
transform: scaleY(0.7);
}
& .base {
width: 100%;
height: 30px;
background: linear-gradient(to right, #8f756b 33%, #644d4c 33% 66%, #433131 66%);
}
}
}
& .antenna-container {
width: 32px;
height: 20px;
background: #8f756b;
border-radius: 5px 5px 0 0;
position: absolute;
top: 11px;
& .top {
width: 12px;
height: 22px;
background: #c0a392;
border-radius: 5px;
position: absolute;
top: -30px;
left: 10px;
display: flex;
align-items: flex-end;
padding-bottom: 4px;
& .dot {
width: 8px;
height: 8px;
border-radius: 5px;
background: #432f31;
}
}
}
}
& .bottom {
width: 100%;
height: 27px;
display: flex;
gap: 15px;
& .pipe {
width: 50%;
border: 14px solid #c0a392;
&::after {
content: "";
display: block;
width: 32px;
height: 15px;
background: #1d0b0c;
position: absolute;
transform: translateY(-15px);
}
&.left {
border-top-right-radius: 15px;
border-left: 0;
border-bottom: 0;
}
&.right {
border-top-left-radius: 15px;
border-right: 0;
border-bottom: 0;
&::after {
right: 0;
}
}
}
}
}
}
& .delorean-top-bottom {
height: 15px;
background: black;
border: calc(var(--border-size) * 1.9) solid var(--border-color);
border-top: 0;
}
& .delorean-middle {
display: flex;
& .left,
& .right {
display: grid;
grid-template-rows: 1.75fr 0.75fr 1fr;
height: 75px;
width: 100%;
height: 75px;
transform: skewX(var(--sx)) translateX(var(--x));
}
& .left {
--sx: 15deg;
--x: 10px;
}
& .right {
--sx: -15deg;
--x: -10px;
}
& .top {
background: #433131;
}
& .left .middle {
justify-content: flex-end;
padding-right: 30px;
}
& .right .middle {
justify-content: flex-start;
background: linear-gradient(to right, transparent 15px, #644d4c 15px);
}
& .middle {
background: #644d4c;
display: flex;
gap: 8px;
& .detail {
width: 32px;
height: 8px;
border-radius: 4px;
background: #1d0b0c;
transform: skewX(calc(var(--sx) * -1)) translate(16px, 4px);
}
}
& .bottom {
background: black;
}
}
& .delorean-bottom {
display: flex;
justify-content: space-between;
height: 60px;
& .wheel {
width: 80px;
height: 45px;
border-radius: 0 0 10px 10px;
background: #070506;
&.left {
transform: translate(40px);
}
&.right {
transform: translate(-40px);
}
}
}
& .delorean-pipelines {
& .pipelines {
width: 320px;
height: 125px;
border-radius: 0 21px 20px 0;
margin: 200px;
transform: skewx(-10deg);
box-shadow: 10px 10px #777;
position: absolute;
top: -60px;
left: 35px;
&.left {
transform: scaleX(-1) translateX(242px) skewx(-10deg);
}
&::before {
content: "";
width: 100%;
height: 155px;
border-radius: 0 20px 18px 0;
position: absolute;
transform: translate(-64px, -120px) skewx(45deg);
box-shadow: 10px -10px #777;
}
}
& .extra {
width: 300px;
display: flex;
justify-content: space-between;
align-items: center;
position: absolute;
bottom: 53px;
left: 22.5%;
& .exhaust-pipe {
--size: 25px;
width: var(--size);
height: var(--size);
border-radius: 50%;
border: 4px solid #433131;
background: #000;
}
& .sign {
width: 200px;
height: 20px;
background: #433131;
}
}
}
& .delorean-shadow {
background: #1118;
width: 100%;
height: 50px;
border-radius: 50%;
transform: translateY(-35px);
position: absolute;
bottom: -35px;
animation: shadow-move 0.1s infinite steps(5) alternate;
}
}
@keyframes engine-move {
0% {
transform: translate(0px, -2px);
}
100% {
transform: translate(0px, 2px);
}
}
@keyframes shadow-move {
0% {
transform: translate(0px, -32px) scale(1.05);
}
100% {
transform: translate(0px, -30px) scale(1);
}
}
.created {
background:
url(https://assets.codepen.io/154065/internal/avatars/users/default.png),
linear-gradient(to bottom, #884ced, #ec1cce);
background-size: 75px 75px, cover;
background-repeat: no-repeat;
position: absolute;
top: 0;
right: 0;
width: 250px;
height: 75px;
display: flex;
flex-direction: column;
align-items: center;
padding-left: 2em;
& span,
& h2,
& p,
& a {
font-family: Montserrat;
margin: 0;
}
& a,
& p,
& span {
color: #fff;
}
& h2 {
font-weight: 700;
transform: translate(0, -4px);
}
& a {
text-decoration-color: rgba(255,255,255,0.4);
}
& a:hover {
color: #e6e82a;
}
}
@media screen and (max-height: 300px) {
.background {
background: #272636;
}
}
.lines-container {
overflow: hidden;
width: 50%;
height: 100%;
perspective: 145px;
position: absolute;
bottom: 0;
& .lines{
width: 100%;
height: 30%;
position: absolute;
bottom: 0;
overflow:hidden;
transform: rotateX(50deg);
&::after{
content: "";
width: 20px;
height: 800px;
position: absolute;
left: 50%;
top: 0;
background: repeating-linear-gradient(#ccc 0 50px, transparent 50px 70px);
animation: move-lines 3s linear infinite;
}
}
}
@keyframes move-lines{
from{
transform: translate(-50%, -210px);
}
to{
transform: translate(-50%, 0);
}
}
/* Look mom, without JS */
Also see: Tab Triggers