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 URL's 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 it's URL and the proper URL extention.
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 Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
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.
<link href="https://fonts.googleapis.com/css?family=Lobster+Two|Nosifer" rel="stylesheet" type='text/css'>
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type='text/css'>
<div id="main">
<div id="img-div" class="center blur-box">
<div id="title" class="text-animation ">
<h1> Attack on Titan </h1>
</div>
<img id="image" src="https://preview.ibb.co/nkKs0p/atackon_Titanbackground.png" alt="Attack on Titan background"
onmouseover="this.src='https://preview.ibb.co/gwFPfp/image.jpg'"
onmouseout="this.src='https://preview.ibb.co/nkKs0p/atackon_Titanbackground.png'">
<h3 id="img-caption"> "This world is merciless, and it's also very beautiful." - Mikasa Ackerman</h3>
</div>
<div id="tribute-info" class="text1 blur-box">
<h2>What is Attack on Titan? </h2>
<p>Attack on Titan (Japanese: 進撃の巨人 Hepburn: Shingeki no Kyojin, lit. "Advancing Giant") is a Japanese manga series written and illustrated by Hajime Isayama. The series began in Kodansha's Bessatsu Shōnen Magazine on September 9, 2009, and has been collected into 26 tankōbon volumes as of August 2018. It is set in a world where humanity lives in cities surrounded by enormous walls protecting the humans from gigantic humanoids that are referred to as titans. The titans vary in height and endlessly eat humans seemingly without reason.</p>
<h2>What is this anime about? </h2>
<p>Over 100 years before the beginning of the story on an alternate world, giant humanoid creatures called Titans (巨人 Kyojin) suddenly appeared and nearly wiped out humanity, devouring them without remorse or reason and only targeting them; they completely ignore other wildlife. What remains of humanity now resides within three enormous curtain walls: the outermost is Wall Maria (ウォール・マリア Wōru Maria); the middle wall is Wall Rose (ウォール・ローゼ Wōru Rōze, sometimes pronounced like rosé) and the innermost is Wall Sheena (ウォール・シーナ Wōru Shīna, alt. "Wall Sina"). Inside these walls, humanity has lived in uneasy peace for one hundred years, many people growing up without ever having seen a Titan. This all changes when one day, a giant 60-meter (200 ft)-tall Colossus Titan mysteriously appears after a strike of lightning and breaches the outer wall (which is 50 meters tall) of the Shiganshina district, a town at Wall Maria, allowing the smaller Titans to invade the district. An Armored Titan smashes clean through the gate in Wall Maria, forcing humankind to abandon the land between Wall Maria and Wall Rose, evacuating the remaining population into the inner districts. The sudden influx of population causes turmoil and famine.</p>
<h2>Titans</h2>
<p>The Titans are giant humanoid figures ranging between 3 and 15 meters (10 and 50 ft) tall and are usually masculine in body structure but lack reproductive organs. Although they do not appear to need food, they instinctively attack and eat humans on sight; it is mentioned that they derive their energy from sunlight. Furthermore, the Titans also do not have a proper digestive tract; once they have eaten their fill of human prey, Titans will vomit large, slimy balls, derisively referred to as "hairballs", as shown in the episode where the squad retakes Trost, half of a soldier named Marco is found engulfed in slime with several humans in one of these. Finally, their skin is tough and difficult to penetrate, and they regenerate quickly from injuries, except for a weak spot at the nape of their neck. </p>
<h4>If you have time, you should read more about this incredible ANIME!
<a id="tribute-link" href="https://en.wikipedia.org/wiki/Attack_on_Titan" target="_blank">Wikipedia Entry</a> </h4>
</div>
</div>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
#image {
width: 100%;
height: auto;
max-width: 625px;
margin-left: auto;
margin-right: auto;
display: block;
}
.blur-box {
background-color: #555;
box-shadow: 0 0 5px 5px #555;
}
p{
padding-left: 20px;
paddinig-right: 20px;
max-width: 950px;
}
h2{
padding-top: 20px;
padding-left: 20px;
}
h4{
padding-left: 20px;
text-align: center;
}
p{
font-family: 'Raleway', Times New Roman;
}
.center{
margin-top: 50px;
display: block;
margin-left: auto;
margin-right: auto;
width: center;
/*text*/
text-align: center;
background-color: rgb(217, 217, 217);
width: 1000px;
height: 600px;
}
.text1{
background-color: rgb(217, 217, 217);
/*Moving the text box*/
display: block;
transform: translate(-50%, 0%);
margin-left: 50%;
/*Text alig*/
text-align: left;
width: 1000px;
height: 750px;
margin-bottom: 30px;
}
.text-animation{
transform: translate(-50%, 0%);
margin-left: 50%;
width: 1000px;
}
.text-animation h1{
margin: 0;
padding-bottom: 0;
text-transform: uppercase;
font-size: 6em;
color: transparent;
background-image: url("https://preview.ibb.co/c6F389/atack.png");
background-repeat: repeat-x;
-webkit-background-clip: text;
background-position: 500px 150px;
font-family: arial;
animation: bloodAnimate 35s linear infinite;
}
@keyframes bloodAnimate
{
0%
{
background-position: left 0px top 0px;
}
40%
{
background-position: left 400px top 0px;
}
60%
{
background-position: left 500px top 0px;
}
80%
{
background-position: left 600px top 0px;
}
100%
{
background-position: left 800px top 0px;
}
}
Also see: Tab Triggers