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.
<html>
<head>
<link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/nazi-typewriter" type="text/css"/>
<link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/michellefont" type="text/css"/>
<link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/fairfax-hd" type="text/css"/>
<title> Nuclear War Survival by Kris Kosta </title>
<style>
</style>
</head>
<body>
<div class="parallax">
<div class="p__layer p__layer__0">
<img src="https://i.pinimg.com/originals/24/4e/0a/244e0a05633ef1c998a6f29eec324824.jpg" width="80%" style="margin-left:550px" />
</div>
<div class="p__layer p__layer__1">
<img src="https://i.ibb.co/L80XGs6/7136296-preview.png" width="1000px" height="500px" style="margin-left: 330px"/>
</div>
<div class="p__layer p__layer__2">
<img src="https://www.pinclipart.com/picdir/big/416-4162959_2363-x-787-21-0-skyline-city-silhouette.png" width= "1400px" height="500px" style="margin-left: 1300px">
</div>
<div class="p__layer p__layer__3">
<img src="https://i.ibb.co/56LMHtK/new-york-skyline-silhouette-png-6.png" width= "2000px" height="650px" style="margin-left: -150px"/>
</div>
<div class="p__layer p__layer__4">
<img src="https://github.com/samdbeckham/blog/blob/master/dev/_assets/images/articles/firewatch/layer_6.png?raw=true" style: "margin-bottom: -140px" />
</div>
<div class="cover">
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<section>
<br>
<br>
<article0> <h2>Lets cover the basics</h2>
<article1>
<p>A nuclear war can sure be a scary thing. Millions dead, cities destroyed, civilizations built on the backs of the sacrifices, work, and ingenuity of countless generations whiped away in a single instantaneous flash of light. More importantly there are no survivors left to appreciate your HTML skills! </p> </article1>
<br>
<br>
<h2><b>Here's what you'll need to know if you want to survive</b></h2>
<div class="grid-container">
<div class="item1">
<a href="https://www.businessinsider.com/nuke-blast-survival-gear-2017-7"><img src="https://i0.wp.com/hiram1555.com/wp-content/uploads/2018/03/ehc0jj.jpg?fit=748%2C498&ssl=1" height="400" width="600> alt="City Nuke"> </a>
<p>Okay so the world ended... now what?</p></div>
<div class="item2">
<a href="http://www.survival-spot.com/survival-blog/survival-equipment/"> <img src="https://cdn.images.express.co.uk/img/dynamic/78/590x/nuclear-war-1214101.jpg?r=1575825086634" alt="Gear"> </a>
<p>Buying the correct protective gear.
</p></div>
<div class="item3">
<a href="https://fallout.fandom.com/wiki/Power_armor"> <img src="https://fiverr-res.cloudinary.com/images/q_auto,f_auto/gigs2/129561530/original/976536917acb0a586cfc813021fdf1c2eb32bc21/draw-realistic-illustration-or-concept-art.jpg" height="600" width="600 alt="Power Armor"> </a>
<p>What Power Armor should I buy?</p></div>
<div class="item4">
<a href="https://www.popularmechanics.com/adventure/outdoors/tips/a24203/eat-forage-food-wild-alone-history-channel/"> <img src="https://i.pinimg.com/736x/ba/d8/fc/bad8fc46413f434d81e26454c1674477--fallout--art-google.jpg" height="500" width="600 alt="food"> </a>
<p>How to eat mutated animals</p></div>
<div class="item5"> <a href="https://www.youtube.com/watch?v=5qE52hylNT0"> <img src="https://a.ltrbxd.com/resized/sm/upload/38/x2/8u/ly/book-of-eli-50-1200-1200-675-675-crop-000000.jpg?k=2b238800b9" height="400" width="600 alt="Eli"> </a>
<p>Some blind dude named "Eli" wants his book back, should I be worried?</p></div>
<div class="item6"> <a href="https://www.space.com/41493-build-a-rocket-3-easy-steps.html"> <img src="https://miro.medium.com/max/8840/1*PH8CyNjf8Bqf-Ka8Yj8qYQ.jpeg" height="400" width="600> alt="Planet Explosion"> </a>
<p>Can I escape Earth to other Worlds?</p></div>
</article0>
<br>
</section>
<br> <br> <br> <br> <br>
<section>
<br>
<br>
<article0>
<h2>Understanding the physics</h2>
<article1>
<p>You might be wondering how every major city in the US got replaced with a smoldering crater because of an atom? Well thats because of nuclear fission!... Or fusion!... Depending on the bomb! At this point the detials probably don't matter to you so lets get down to business.
</p>
</article1>
<article1White>
<img src="https://catherinehaustein.files.wordpress.com/2019/07/depositphotos_36147415_l-2015.jpg" height="auto" width="100%" alt="fission">
<p> An unstable atom splits into two or more smaller pieces that are more stable, and releases energy (gamma rays) in the process. This energy can then split additional atoms and cause a nuclear fission chain reaction which leads up to a massive nuclear explosion. </p>
</article1White>
<article1Vid> <img src="https://cdn.lowgif.com/small/348856fbf53134b5-.gif" height="auto" width="100%" alt="nuke">
</article1Vid>
<h3>
A nuclear explosion swallowing an island
</h3>
<h3> (for scale) </h3>
<article1White>
<p>Radiation is energy. This can be in the form of a wave or particle. Not all radiation is directly harmful. Radiation can span from radio waves used for phones, to gamma rays which blow apart your DNA. Radiation, energy, frequencies, waves, and vibrations are all the same thing. Radiation is energy, energy is waves, waves are vibrations, and vibrations are oscillating frequencies.
</p>
</article1White>
<article1White><p> Some of the molecules in your body are polar, meaning they have a positive and negative side (think of a compass). These molecules orient themselves with whichever magnetic field they are in (like a compass). An electromagnetic wave oscillates (goes up and down) its magnetic field. This causes the polar molecules to spin back and forth. When a molecule is flipping up and down over 10,000,000,000,000,000,000 times a second… It starts to create problems...
</p> </article1White>
<br>
<p1>
<a> <img src="https://www.mcgill.ca/oss/files/oss/styles/hd/public/radiation.jpg?itok=t7Oxm1NC×tamp=1497795023" alt="EM Spectrum">
</p1>
<h4> (Electromagnetic Spectrum for reference) </h4>
<br> <br> <br> <br>
</article0>
</section>
<br>
<br>
<!-- <section> -->
<br>
<br>
<!-- <footer>This website is built by Kris Kosta © 2022 <a href= "https://codepen.io/kjkosta">https://codepen.io/kjkosta </a></footer> -->
<!--
</section> -->
<!-- Parallax ending divs -->
</div>
</div>
</body>
</html>
@import "compass/css3";
*{
box-sizing: border-box;
}
html,
body{
background-color: #460106;
}
.parallax {
perspective: 100px;
height: 100vh;
overflow-x: hidden;
overflow-y: auto;
position: absolute;
top: 0;
left: 50%;
right: 0;
bottom: 0;
margin-left: -1500px;
}
.p__layer{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;}
.p__layer > img{
display: block;
position: absolute;
bottom: 0;
}
.p__layer__1{margin-top: 300px;}
.p__layer__2{margin-top: -100px;}
.p__layer__3{margin-top: 100px;}
.cover{
background:
linear-gradient( #2D112B, black, #de6041, #de6041, #de6041, #de6041);
display: block;
position: absolute;
height: 8000px;
z-index: 2;
top: 100%;
left: 0;
right: 0;
margin-top: -20px;
}
$p__layers: 4;
@for $i from 0 through $p__layers {
$x: ($p__layers - $i) / 2;
.p__layer__#{$i}{
transform: translateZ(-100 * $x#{px}) scale($x + 1);
}
}
/* width */
::-webkit-scrollbar {
width: 8px;
}
/* Track */
::-webkit-scrollbar-track {
//background: #f1f120;
background: black;
//background-image: linear-gradient(#f1f120, black);
border-radius: 0px;
box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}
/* Handle */
::-webkit-scrollbar-thumb {
border-radius: 0px;
background: red;
}
section
{box-shadow: inset 10px 10px 10px rgba(0, 0, 0,11.5);
margin-top: 0px;
margin: 0;
width: 1000px;
background-color: black;
padding: 50px;
padding-top: 0px;
padding-bottom: auto;
border-radius: 30px;
margin-left: 1000px;
}
article0{
width: auto;
postion: center;
margin-left: 0, auto;
margin-right: 0, auto;
border-radius: 10px;
box-shadow: inset 0 0 10px rgba(0,0,0,.5);
display: flex;
flex-direction: row;
flex-wrap: wrap;
font-size: auto;
padding: 60px;
background:
linear-gradient(#f2eecb, #cfb997);
// background: linear-gradient(#f2eecb, #f1f0eb);
}
article1
{
border: gray;
background: #aaaa;
margin: 10px, auto;
padding: 50px;
width: auto;
postion: center;
margin-left: 0, auto;
margin-right: 0, auto;
border-radius: 10px;
box-shadow: inset 0 0 10px rgba(0,0,0,.5);
display: flex;
flex-direction: row;
flex-wrap: wrap;
font-size: auto;
}
article1White
{
border: black;
background: white;
margin: 10px, auto;
padding: 30px;
margin-top: 40px;
width: 100%;
postion: center;
border-radius: 10px;
box-shadow: inset 0 0 10px rgba(0,0,0,1.5);
display: flex;
flex-direction: row;
flex-wrap: wrap;
font-size: auto;
}
article1Vid
{
border: black;
background:black;
margin: 10px, auto;
padding: 5px;
margin-top: 40px;
width: 100%;
postion: center;
border-radius: 10px;
box-shadow: inset 10px 10px 10px 10px rgba(0,0,0,1.5);
display: flex;
flex-direction: row;
flex-wrap: wrap;
font-size: auto;
}
article2
{
border: gray;
background: #aaaa;
margin: 10px, auto;
margin-top: 50px;
padding: auto;
width: auto;
margin-left: 0, auto;
margin-right: 0, auto;
border-radius: 10px;
box-shadow: inset 0 0 10px rgba(0,0,0,.5);
display: flex;
ffex-direction: row;
flex-wrap: wrap;
width: 100%
}
article3
{
border: gray;
background: #aaaa;
margin: 10px, auto;
padding: 30px;
margin-left: 50, auto;
margin-right: 50, auto;
border-radius: 10px;
box-shadow: inset 0 0 10px rgba(0,0,0,.5);
display: flex;
flex-wrap: wrap;
width: 100%;
}
/*-------------GRIDS------------- */
.grids1 {
grid-area: myArea;
}
.grid-container {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 5px;
}
.grid-container > div {
border-radius: 5px;
box-shadow: 1px 1px 5px;
border: black;
margin: 20px;
background-color: white;
text-align: left;
padding: 20px;
font-size: 20px;
box-shadow: inset 0 0 10px rgba(0,0,0,1.5);
}
.grid-container > div:hover{
cursor: pointer;
}
.grid-container2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 5px;
}
.grid-container2 > div {
border-radius: 5px;
box-shadow: 1px 1px 5px;
border: black;
margin: 20px;
background-color: white;
text-align: left;
padding: 20px;
font-size: 20px;
box-shadow: inset 0 0 10px rgba(0,0,0,1.5);
}
/*-------------Format------------- */
h2
{
font-family: 'NaziTypewriterRegular';
margin-left: 30%;
margin-right: 20%;
color: black;
}
h3{
font-family: 'NaziTypewriterRegular';
margin-left: 20%;
margin-right: 20%;
color: black;
}
h3 + h3 {
text-indent: 170px;
margin-top: 0px;
}
h4{
font-family: 'NaziTypewriterRegular';
margin-left: 0px;
margin-right: 0px;
color: black;
text-indent: 200px;
}
p{
font-size: 20px;
font-family: 'IBM Plex Mono', monospace;
color: black;
}
a > img {
width: 100%;
height: auto;
}
p1{
border: black;
//background: white;
background:
white;
margin-top: 60px;
box-shadow: inset 0 0 10px rgba(0,0,0,1.5);
padding: 30px;
border-radius: 10px;
box-shadow: inset 0 0 10px rgba(0,0,0,1.5);
display: flex;
flex-direction: row;
flex-wrap: wrap;
font-size: auto;
}
footer{
background: black;
color: white;
padding: 10px;
width: 5%;
margin: auto;
width: 40vw;
justify-content: center;
display: flex;
border-radius: 15px;
margin-left: 1150px;
}
//------------------------------------------------
// SCREEN SIZES
@media(max-width: 900px){
/* width */
::-webkit-scrollbar {
width: 0px;
}
.cover{display: flex; flex-wrap: wrap; justify-content: center; padding: 0px; background:
linear-gradient( #2D112B, black, #de6041); height: 3200px;}
section{padding: 0px; margin-left: auto; width: 100vw; height: 100vh; margin-top: 400px; background: transparent; box-shadow: none;}
article0{width: 100vw; border: solid black 20px; margin: 0px; font-size: 14px; padding: 20px;}
p{font-size: 20px;}
h2, h3, h4{margin: 0px; margin-top: 14px; margin-bottom: 14px; padding: 0px; margin-left: auto; margin-right: auto; text-indent: 0px;}
.grid-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
grid-gap: 1px;}
.grid-container > div {
box-shadow: 1px 1px 5px;
margin: 8px;
max-width: 200px;
font-size: 20px;
box-shadow: inset 0 0 10px rgba(0,0,0,1.5);}
.p__layer__0{background-size: cover; width: 300vw; margin-top: 0px; margin-left: 500px;}
.parallax {
//background: linear-gradient(#9f100d, #9f100d, #460106); background-size: cover;
background:#9f100d;
padding-top:0px;
}
footer{margin-bottom: 0px; width: 100vw; visibility: hidden;}}
@media(max-width:550px){
p{font-size: 14px;}
.p__layer__0{background-size: cover; width: 300vw; margin-top: 500px; margin-left: 1000px;}
.p__layer__2{margin-top: -600px; position: absolute; display: block; margin-left: -1040px;filter: brightness(300%);}
.p__layer__3{margin-top: 100px; position: absolute; display: block; }
.p__layer__4{margin-top: 500px; position: absolute; display: block; }
}
Also see: Tab Triggers