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.
<!-- Thanks for taking a look! -->
<link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Amatic+SC' rel='stylesheet' type='text/css'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- BACK TO TOP ARROW -->
<a class="smoothScroll" href="#welcome"><img id="btt" class="img-responsive" src="http://allfordance.com/image/orbital-arrow-up.png"></a>
<!-- NAV -->
<div id="myNav" class="overlay">
<!-- Button to close the overlay navigation -->
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<!-- Overlay content -->
<div class="overlay-content">
<a class="smoothScroll" href="#welcome" onclick="closeNav()">Home</a>
<a class="smoothScroll" href="#about" onclick="closeNav()">About</a>
<a class="smoothScroll" href="#portfolio" onclick="closeNav()">Portfolio</a>
</div>
</div>
<!-- Use any element to open/show the overlay navigation menu -->
<span id="openmenu" onclick="openNav()"><b>Menu</b></span>
<center>
<!-- WELCOME -->
<div id="welcome">
<h1>Polianthes</h1>
<h3><b>Web Developer</b></h3>
<a class="smoothScroll" href="#about"><img id="press" src="http://gowingwoman.com/img/menu_down_arrow.png"></a>
</div>
</center>
<!-- ABOUT -->
<div id="about">
<h1>About Me</h1>
<center>
<div id="self">
<img class="img-responsive" src="http://vignette3.wikia.nocookie.net/pokepastatrollpasta/images/e/e7/Derpy_Charmander_Is_derpy_I_dont_think_I_ve_seen_this_gif_29ade7_4327381.gif/revision/latest?cb=20140613173519">
</div>
</center>
<br>
<p>Hi! I’m Emerald Teve, a.k.a. Polianthes, and web development is my passion.<br><br> I help people build websites they love, and I absolutely adore making people smile.<br><br> When I’m not programming, you can find me drawing, or drinking a nice cup
of tea.
<br><br>If you'd like, scroll down to see some examples of my work!<br><br>Want to work together? I’d love to hear from you!</p>
<br><br>
<span id="email">
<img src="http://sellbuybook.com/images/email.png"> emerald.teve@gmail.com</span>
<span id="portScroll">
<a class="smoothScroll" href="#portfolio"><img src="http://www.meegankent.com/images/portfolio-icon2.png"> View My Portfolio</a></span>
</div>
<!-- PORTFOLIO -->
<div id="portfolio">
<h1>Portfolio</h1>
<h3>Here you'll find some projects I've worked on! Click on a project to see a demo of it.</h3>
<br>
<center>
<div id="port" class="container">
<table>
<!-- PORTFOLIO -->
<tr>
<a target="_blank" href="https://s.codepen.io/Polianthes/debug/xVQoRx#"><img class="img-responsive thumbnail" src="https://images.unsplash.com/photo-1423589989400-cc0270157ed0?crop=entropy&fit=crop&fm=jpg&h=900&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1300"></a>
</tr>
<!-- UPWORK -->
<tr>
<a target="_blank" href="https://s.codepen.io/Polianthes/debug/NNBLQw/XBrGRqgdvoZM"><img class="img-responsive thumbnail" src="https://farm8.staticflickr.com/7274/26213112344_c162d26712_b.jpg"></a>
</tr>
<!-- TRIBUTE PAGE -->
<tr>
<a target="_blank" href="https://s.codepen.io/Polianthes/debug/NNpJwN"><img class="img-responsive thumbnail" src="https://farm8.staticflickr.com/7387/26213110134_8afa53cf2e_b.jpg"></a>
</tr>
</table>
</div>
</center>
</div>
body {
font-family: 'Roboto Slab', serif;
color: white;
background-color: #68BDCA;
}
/* BACK TO TOP BUTTON*/
#btt {
position: fixed;
margin-bottom: 20px;
margin-right: 20px;
bottom: 0;
right: 0;
opacity: 0.8;
width: 50px;
transition: margin-bottom 0.6s, opacity 0.6s;
}
#btt:hover {
margin-bottom: 25px;
opacity: 1;
transition: margin-bottom 0.6s, opacity 0.6s;
}
/* WELCOME */
#welcome {
font-family: 'Amatic SC', cursive;
color: #FCFFFF;
background: url("https://images.unsplash.com/photo-1423589989400-cc0270157ed0?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=458cf2662814c68b6eb24d9e55801fa0");
background-repeat: no-repeat;
background-size: cover;
height: 100vh;
width: auto;
padding: 5% 5% 5% 5%;
}
#welcome h1,
#portfolio h1 {
font-size: 70pt;
font-weight: bold;
}
#welcome h3,
#portfolio h3 {
font-size: 28pt;
}
/* DOWN ARROW */
#press {
width: 60px;
border: solid 4px white;
border-radius: 40px;
margin-top: 20%;
transition: background-color 0.6s, opacity 0.6s, margin-top 1s;
}
#press:hover {
background-color: #5BC2B4;
opacity: 0.8;
margin-top: 21%;
transition: background-color 0.6s, opacity 0.6s, margin-top 1s;
}
/* ABOUT */
#about {
background-color: #0A3739;
padding: 5% 5% 5% 5%;
height: 100vh;
width: auto;
}
#about h1 {
font-family: 'Amatic SC', cursive;
font-size: 40pt;
font-weight: bold;
text-align: left;
}
#about p {
text-align: left;
}
#about #email img {
text-align: left;
width: 25px;
}
#email {
background-color: #26816E;
padding: 2% 2% 2% 2%;
border-radius: 40px;
transition: box-shadow 0.5s, color 0.8s, background-color 0.5s;
}
#portScroll {
background-color: #26816E;
padding: 2% 2% 2% 2%;
border-radius: 40px;
margin-left: 2%;
transition: box-shadow 0.5s, color 0.8s, background-color 0.5s;
}
#about #portScroll img {
text-align: left;
margin-right: 5px;
width: 18px;
}
#portScroll a,
#portScroll a:hover {
color: white;
text-decoration: none;
}
#email:hover,
#portScroll:hover {
box-shadow: 5px 15px 30px #062928;
background-color: #1A616C;
transition: box-shadow 0.5s, color 0.8s, background-color 0.5s;
cursor: pointer;
}
#self img {
width: 35%;
float: right;
border: solid 8px #26816E;
border-radius: 2000px;
box-shadow: 5px 15px 30px #062928;
}
/* PORTFOLIO */
#portfolio {
font-family: 'Amatic SC', cursive;
background-color: #68BDCA;
text-decoration: none;
color: white;
padding: 5% 5% 5% 5%;
width: auto;
height: 100vh;
}
#portfolio h3 {
font-family: 'Roboto Slab', serif;
font-size: 15pt;
}
#port img {
width: 500px;
opacity: 0.5;
transition: opacity 0.5s, box-shadow 0.5s;
}
#port img:hover {
opacity: 1;
box-shadow: 0px 10px 50px #406D91;
transition: opacity 0.5s, box-shadow 0.5s;
}
/* NAV */
#openmenu {
font-family: 'Amatic SC', cursive;
font-size: 20pt;
background-color: #68BDCA;
border-bottom: solid 2px white;
border-right: solid 2px white;
position: fixed;
padding: 2px;
width: 10%;
text-align: center;
top: 0;
left: 0;
transition: width 0.5s;
}
#openmenu:hover {
width: 15%;
transition: width 0.5s;
cursor: pointer;
}
.overlay {
/* Height & width depends on how you want to reveal the overlay (see JS below) */
height: 100%;
width: 0;
position: fixed;
/* Stay in place */
z-index: 1;
/* Sit on top */
left: 0;
top: 0;
background-color: rgb(0, 0, 0);
/* Black fallback color */
background-color: rgba(0, 0, 0, 0.9);
/* Black w/opacity */
overflow-x: hidden;
/* Disable horizontal scroll */
transition: 0.5s;
/* 0.5 second transition effect to slide in or slide down the overlay (height or width, depending on reveal) */
}
/* Position the content inside the overlay */
.overlay-content {
position: relative;
top: 25%;
/* 25% from the top */
width: 100%;
/* 100% width */
text-align: center;
/* Centered text/links */
margin-top: 30px;
/* 30px top margin to avoid conflict with the close button on smaller screens */
}
/* The navigation links inside the overlay */
.overlay a {
padding: 8px;
text-decoration: none;
font-size: 36px;
color: #818181;
display: block;
/* Display block instead of inline */
transition: 0.3s;
/* Transition effects on hover (color) */
}
/* When you mouse over the navigation links, change their color */
.overlay a:hover,
.overlay a:focus {
color: #f1f1f1;
}
/* Position the close button (top right corner) */
.closebtn {
position: absolute;
top: 20px;
right: 45px;
font-size: 60px !important;
/* Override the font-size specified earlier (36px) for all navigation links */
}
/* When the height of the screen is less than 450 pixels, change the font-size of the links and position the close button again, so they don't overlap */
@media screen and (max-height: 450px) {
.overlay a {
font-size: 20px
}
.closebtn {
font-size: 40px !important;
top: 15px;
right: 35px;
}
}
/* Open when someone clicks on the span element */
function openNav() {
document.getElementById("myNav").style.width = "100%";
}
/* Close when someone clicks on the "x" symbol inside the overlay */
function closeNav() {
document.getElementById("myNav").style.width = "0%";
}
$(function() {
// This will select everything with the class smoothScroll
// This should prevent problems with carousel, scrollspy, etc...
$('.smoothScroll').click(function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1300); // The number here represents the speed of the scroll in milliseconds
return false;
}
}
});
});
// Change the speed to whatever you want
// Personally i think 1000 is too much
// Try 800 or below, it seems not too much but it will make a difference
Also see: Tab Triggers