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

              
                <h1>Super Mario Timeline</h1>
<img class="cloud" src="https://raw.githubusercontent.com/LantareCode/random-this-and-thats/master/CSS/SuperMario-Animation/images/CloudSingle.gif">
<img class="cloud" src="https://raw.githubusercontent.com/LantareCode/random-this-and-thats/master/CSS/SuperMario-Animation/images/CloudDouble.gif">
<img class="cloud" src="https://raw.githubusercontent.com/LantareCode/random-this-and-thats/master/CSS/SuperMario-Animation/images/CloudTriple.gif">
<p>Initial launch dates of games in the Super Mario series. </p>
<ul class="timeline">
	<li><time datetime="1985-09">September 1985</time>Super Mario Brothers</li>
	<li><time datetime="1986-06">June 1986</time>Super Mario BrosThe Lost Levels</li>
	<li><time datetime="1988-10">October 1988</time>Super Mario Bros. 2</li>
	<li><time datetime="1988-10">October 1988</time>Super Mario Bros. 3</li>
	<li><time datetime="1989-04">April 1989</time>Super Mario Land</li>
	<li><time datetime="1990-11">November 1990</time>Super Mario World</li>
	<li><time datetime="1992-10">October 1992</time>Super Mario Land6 Golden Coins</li>
	<li><time datetime="1995-08">August 1995</time>Super Mario World 2Yoshi's Island</li>
	<li><time datetime="1996-06">June 1996</time>Super Mario 64</li>
	<li><time datetime="2002-07">July 2002</time>Super Mario Sunshine</li>
	<li><time datetime="2006-05">May 2006</time>New Super Mario Bros.</li>
	<li><time datetime="2007-11">November 2007</time>Super Mario Galaxy</li>
	<li><time datetime="2009-11">November 2009</time>New Super Mario Bros. Wii</li>
	<li><time datetime="2010-05">May 2010</time>Super Mario Galaxy 2</li>
	<li><time datetime="2011-11">November 2011</time>Super Mario 3D Land</li>
	<li><time datetime="2012-07">July 2012</time>New Super Mario Bros 2</li>
	<li><time datetime="2012-11">November 2012</time>New Super Mario Bros. U</li>
	<li><time datetime="2013-11">November 2013</time>Super Mario 3D World</li>
	<li><time datetime="2015-09">September 2015</time>Super Mario Maker</li>
	<li><time datetime="2016-12">December 2016</time>Super Mario Run</li>
	<li><time datetime="2017-10">October 2017</time>Super Mario Odyssey</li>
	<li><time datetime="2019-06">June 2019</time>Super Mario Maker 2</li>
	<li><time datetime="2021-02">February 2021</time>Super Mario 3D World + Bowser's Fury</li>
</ul>
<footer>Powered by René Orozco</footer>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

body {
	font-family: "Press Start 2P", cursive;
	margin: 0;
	overflow-x: hidden;
	padding: 0;
}
body:before {
	background: linear-gradient(#548cff, #3364c9);
	content: "";
	display: block;
	height: 100vh;
	position: fixed;
	width: 100%;
}
body > * {
	position: relative;
	z-index: 1;
}
.cloud {
	height: 40px;
	opacity: 0.5;
	position: fixed;
}
.cloud:nth-child(2) {
	animation: wind 80s both infinite linear reverse;
	top: 20%;
}
.cloud:nth-child(3) {
	animation: wind 50s both infinite linear reverse;
	top: 40%;
}
.cloud:nth-child(4) {
	animation: wind 30s both infinite linear reverse;
	top: 60%;
}
h1 {
	color: white;
	margin: 0 auto 30px;
	padding: 60px 20px 0;
	text-align: center;
	text-shadow: 1px 1px 1px gray;
}
p {
	color: white;
	margin-bottom: calc(50vh - 120px);
	text-align: center;
}
footer {
	align-items: flex-end;
	color: white;
	display: flex;
	font-size: 10px;
	justify-content: center;
	min-height: calc(50vh - 260px);
	padding: 0 30px 30px;
	text-align: center;
}
.timeline {
	list-style: none;
	margin: auto;
	max-width: 920px;
}
.timeline li {
	align-items: center;
	box-sizing: border-box;
	color: transparent;
	display: flex;
	font-size: 20px;
	height: 180px;
	margin: 0 auto;
	opacity: 0.2;
	padding: 0 0 125px calc(50% + 60px);
	position: relative;
	transition: all 500ms;
}
.timeline li time {
	left: 0;
	position: absolute;
	text-align: right;
	width: calc(50% - 60px);
}
.timeline .active {
	opacity: 1;
}
.timeline .active.last {
	color: white;
}
.timeline li:after {
	background: #000;
	bottom: 0px;
	content: "";
	display: block;
	height: 130px;
	left: calc(50% - 2px);
	position: absolute;
	width: 4px;
}
.timeline li.active:after {
	opacity: 0.2;
}
.timeline li:last-child:after {
	display: none;
}
.timeline li:before {
	background: linear-gradient(#000 0 0) 3px 3px,
		linear-gradient(#000 0 0) calc(100% - 3px) 3px,
		linear-gradient(#000 0 0) 3px calc(100% - 3px),
		linear-gradient(#000 0 0) calc(100% - 3px) calc(100% - 3px), #fab931;
	background-repeat: no-repeat;
	background-size: 3px 3px;
	border: 3px solid;
	border-color: #994800 #000 #000 #994800;
	box-sizing: border-box;
	color: #994800;
	content: "?";
	font-family: sans-serif;
	font-size: 46px;
	font-weight: bold;
	height: 50px;
	left: calc(50% - 25px);
	line-height: 1em;
	position: absolute;
	text-align: center;
	text-shadow: 2px 2px black;
	top: 0;
	transition: all 500ms;
	width: 50px;
	z-index: 1;
}
.timeline:last-of-type li.active.last:before {
	transform: scale(1.5);
}
.timeline li time:before {
	background-color: #f44336;
	box-shadow: -90px 0 0 0 #ffccbc, -80px 0 0 0 #ffccbc, -70px 0 0 0 #ffccbc,
		-60px 0 0 0 #f44336, -50px 0 0 0 #f44336, -40px 0 0 0 #f44336,
		-30px 0 0 0 #f44336, -20px 0 0 0 #2196f3, -10px 0 0 0 #f44336,
		10px 0 0 0 #f44336, 20px 0 0 0 #2196f3, 30px 0 0 0 #f44336, 40px 0 0 0 #f44336,
		70px 0 0 0 #795548, -30px -10px 0 0 #ffccbc, -20px -10px 0 0 #ffccbc,
		-10px -10px 0 0 #ffccbc, 0px -10px 0 0 #ffccbc, 10px -10px 0 0 #ffccbc,
		20px -10px 0 0 #ffccbc, 30px -10px 0 0 #ffccbc, 40px -10px 0 0 #f44336,
		50px -10px 0 0 #f44336, -50px -20px 0 0 #795548, -40px -20px 0 0 #795548,
		-30px -20px 0 0 #ffccbc, -20px -20px 0 0 #ffccbc, -10px -20px 0 0 #ffccbc,
		0px -20px 0 0 #ffccbc, 10px -20px 0 0 #333, 20px -20px 0 0 #333,
		30px -20px 0 0 #333, 40px -20px 0 0 #333, 50px -20px 0 0 #f44336,
		-50px -30px 0 0 #795548, -40px -30px 0 0 #ffccbc, -30px -30px 0 0 #795548,
		-20px -30px 0 0 #795548, -10px -30px 0 0 #ffccbc, 0px -30px 0 0 #ffccbc,
		10px -30px 0 0 #ffccbc, 20px -30px 0 0 #333, 30px -30px 0 0 #ffccbc,
		40px -30px 0 0 #ffccbc, 50px -30px 0 0 #ffccbc, 60px -30px 0 0 #f44336,
		-50px -40px 0 0 #795548, -40px -40px 0 0 #ffccbc, -30px -40px 0 0 #795548,
		-20px -40px 0 0 #ffccbc, -10px -40px 0 0 #ffccbc, 0px -40px 0 0 #ffccbc,
		10px -40px 0 0 #333, 20px -40px 0 0 #ffccbc, 30px -40px 0 0 #ffccbc,
		40px -40px 0 0 #ffccbc, 50px -40px 0 0 #f44336, 60px -40px 0 0 #f44336,
		-40px -50px 0 0 #795548, -30px -50px 0 0 #795548, -20px -50px 0 0 #795548,
		-10px -50px 0 0 #ffccbc, 0px -50px 0 0 #ffccbc, 10px -50px 0 0 #333,
		20px -50px 0 0 #ffccbc, 40px -50px 0 0 #f44336, 50px -50px 0 0 #f44336,
		60px -50px 0 0 #f44336, -40px -60px 0 0 #f44336, -30px -60px 0 0 #f44336,
		-20px -60px 0 0 #f44336, -10px -60px 0 0 #f44336, 0px -60px 0 0 #f44336,
		10px -60px 0 0 #f44336, 20px -60px 0 0 #f44336, 30px -60px 0 0 #f44336,
		40px -60px 0 0 #f44336, 50px -60px 0 0 #ffccbc, 60px -60px 0 0 #ffccbc,
		-30px -70px 0 0 #f44336, -20px -70px 0 0 #f44336, -10px -70px 0 0 #f44336,
		0px -70px 0 0 #f44336, 10px -70px 0 0 #f44336, 40px -70px 0 0 #ffccbc,
		50px -70px 0 0 #ffccbc, 60px -70px 0 0 #ffccbc, -90px 10px 0 0 #ffccbc,
		-80px 10px 0 0 #ffccbc, -70px 10px 0 0 #ffccbc, -60px 10px 0 0 #f44336,
		-50px 10px 0 0 #f44336, -40px 10px 0 0 #f44336, -30px 10px 0 0 #f44336,
		-20px 10px 0 0 #f44336, -10px 10px 0 0 #2196f3, 0px 10px 0 0 #f44336,
		10px 10px 0 0 #f44336, 20px 10px 0 0 #f44336, 30px 10px 0 0 #2196f3,
		60px 10px 0 0 #795548, 70px 10px 0 0 #795548, -80px 20px 0 0 #ffccbc,
		-40px 20px 0 0 #f44336, -30px 20px 0 0 #f44336, -20px 20px 0 0 #f44336,
		-10px 20px 0 0 #2196f3, 0px 20px 0 0 #2196f3, 10px 20px 0 0 #2196f3,
		20px 20px 0 0 #2196f3, 30px 20px 0 0 #ffeb3b, 40px 20px 0 0 #2196f3,
		50px 20px 0 0 #2196f3, 60px 20px 0 0 #795548, 70px 20px 0 0 #795548,
		-30px 30px 0 0 #2196f3, -20px 30px 0 0 #2196f3, -10px 30px 0 0 #2196f3,
		0px 30px 0 0 #ffeb3b, 10px 30px 0 0 #2196f3, 20px 30px 0 0 #2196f3,
		30px 30px 0 0 #2196f3, 40px 30px 0 0 #2196f3, 50px 30px 0 0 #2196f3,
		60px 30px 0 0 #795548, 70px 30px 0 0 #795548, -50px 40px 0 0 #795548,
		-40px 40px 0 0 #795548, -30px 40px 0 0 #2196f3, -20px 40px 0 0 #2196f3,
		-10px 40px 0 0 #2196f3, 0px 40px 0 0 #2196f3, 10px 40px 0 0 #2196f3,
		20px 40px 0 0 #2196f3, 30px 40px 0 0 #2196f3, 40px 40px 0 0 #2196f3,
		50px 40px 0 0 #2196f3, 60px 40px 0 0 #795548, 70px 40px 0 0 #795548,
		-60px 50px 0 0 #795548, -50px 50px 0 0 #795548, -40px 50px 0 0 #795548,
		-30px 50px 0 0 #2196f3, -20px 50px 0 0 #2196f3, -10px 50px 0 0 #2196f3,
		0px 50px 0 0 #2196f3, 10px 50px 0 0 #2196f3, 20px 50px 0 0 #2196f3,
		-60px 60px 0 0 #795548, -50px 60px 0 0 #795548;
	content: "";
	display: block;
	height: 10px;
	opacity: 0;
	position: absolute;
	right: -65px;
	top: 120px;
	transform: scale(0.4);
	transition: all 400ms;
	width: 10px;
	z-index: 2;
}
.timeline li.active.last time:before {
	opacity: 1;
	top: 80px;
}
@keyframes wind {
	from {
		left: -300px;
	}
	to {
		left: 100%;
	}
}

              
            
!

JS

              
                $(window).on("load", function () {
	$(".timeline li").eq(0).addClass("active last");
});
$(window).on("scroll", function () {
	$(".timeline li").removeClass("active last");
	$(".timeline li").each(function () {
		if (
			$(this).offset().top <
			$(window).scrollTop() + $(window).height() / 2 + 25
		)
			$(this).addClass("active");
	});
	$(".timeline .active").last().addClass("last");
});

              
            
!
999px

Console