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>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<body class="container-fluid">
<!-- <div id="navbar1">-->
<nav id="topNav">
<ul class="nav nav-pills nav-justified nav-fluid">
<li class="active"><a href="#Home">Home</a>
</li>
<li><a href="#About">About
</a></li>
<li><a href="#Portfolio">Portfolio
</a></li>
<li><a href="#Contact">Contact Me</a></li>
</ul>
</div>
</nav>
<div id="page">
<div class="container-fluid home">
<a id="Home"></a>
<div class="container-fluid">
<div id="welcome-section" class="col-xs-8 col-xs-offset-4 hometext"> Hello, my name is Brian, and I am a front-end site developer. I make it a point to give every project my full attention, and the same attention to detail regardless of project size. I am proud to admit I do not know everything about web development, because it gives me chances to learn. This site is being updated as I learn and hone my skills.
</div>
</div>
</div>
<div id="About" class="container-fluid about ">
<br>
<br>
<h4>About Me</h4>
<p? Currently I specialize in HTML, CSS, Svelte, and Javascript projects with an emphasis on responsive design. I am in the process of expanding my technologies, but what I am working with is not currently ready for projects.</p>
<div>
<p class="container aboutp">I bring a very close attention to detail to every project I do. By the time the planning phase is done, I have the site design fully formed, and I am extremely tenatious when it comes to realizing that vision. Any changes can easily be incorporated
as the project needs evolve as well. If the product I'm seeing doesn't match what it should, it only makes me more determined to make it right.
<br>
<br>
Currently I am able to program in Javascript, Svelte, and JQuery, and I am currently learning React and Gatsby
</p>
</div>
</div>
<div id="Portfolio" class="container-fluid portfolio ">
<div class="row">
<div class="col-xs-6 imgleft"> <a target="_blank" href="https://codepen.io/dewain38/full/ZKmXmN/">
<div class="thumbnail">
<iframe src="https://codepen.io/dewain38/full/ZKmXmN/" frameborder="0"></iframe>
</div>
<div class="desc">Above is a weather page I built. It only functions with geolocation enabled. This was a learning project I created before building with responsive design. It forced me to learn how to incorporate an API, as well as some fun conditional changes. It may be one of my older sites, but it's still one of my favorites because of its usefulness</div>
</div>
<div class="row pair">
<div class="col-xs-6 imgright">
<div class="thumbnail">
<a target="_blank" href="https://codepen.io/dewain38/full/BWzxWO/">
<iframe src="https://codepen.io/dewain38/full/BWzxWO/" frameborder="0"></iframe>
</div>
<div class="desc">Here is an example of a content generator page. It uses JSON api calls for each quote. This was another learning project, but I was learning how to implement sharing data that could be changed with a click and refetched</div>
</div>
</div>
</div>
</div>
</div>
<div id="Contact" class="container contact ">
<br>
<br>
<div class="row">
<div class="col-xs-2">
<a href="https://www.linkedin.com/in/brian-hawkins-44752b5
" target="_blank"><img class="thumbs" src="http://i959.photobucket.com/albums/ae78/dewain38/In-2C-94px-TM_zpsrmb3kuys.png" border="0" alt=" photo In-2C-94px-TM_zpsrmb3kuys.png" /></a>
</div>
<div class="col-xs-2">
<a href="https://www.facebook.com/dewain38" target="_blank"><img class="thumbs" src="http://i959.photobucket.com/albums/ae78/dewain38/facebook-android_zpsjg6w2bge.png" border="0" alt=" photo facebook-android_zpsjg6w2bge.png" /></a>
</div>
<div class="col-xs-6 col-xs-offset-2">
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSfKhpWL3FSlvs1bBvO7Ip9JLjAnR6BqhoaQQ_PmSycHEgH1ZA/viewform?embedded=true" width="640" height="934" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
</div>
<h2>Please be patient while I retool. Currently re-writing this page with new technologies and skills</h2>
</div>
</div>
</body>
<footer>
</footer>
body {
background-color: #dddddd;
color: green;
position: relative;
margin: 0;
padding: 0;
}
#page {
margin-top: 3.5em;
min-height: 100px;
}
.nav {
background-color: black;
}
ul {
width: 100%;
}
ul li {
float: right;
}
.home {
background-image: url("http://i959.photobucket.com/albums/ae78/dewain38/Kayak-Startup-Tech-Office-monochrome-meeting-room-glass-wall_zpsgj0nvpfm.jpg");
background-size: 100% 100%;
color: black;
height: 600px;
width: 100%;
}
.about {
background-image: url("http://image.shutterstock.com/z/stock-vector-responsive-web-design-and-web-development-vector-illustration-flat-office-desk-style-icons-and-236339074.jpg");
color: black;
height: 650px;
background-size: 100% 100%;
width: 100%;
}
.about p {
margin-top: 400px;
text-align: center;
}
.portfolio {
background-image: url("http://i959.photobucket.com/albums/ae78/dewain38/thilakarathna_Computer_Vector_Clipart_zpsgxfnx9ns.png");
color: white;
height: 900px;
width: 100%;
background-size: 100% 100%;
}
.contact {
background: url("http://wallpapershidef.com/wp-content/gallery/best-background-images-for-website/monitor-on-blue-backgrounds-monitor-on-blue-powerpoint-free.jpg");
color: black;
height: 600px;
}
.hometext {
padding: 100px 0px 0px 0px;
text-align: right;
}
#success_message {
display: none;
}
#contact_form {
padding: 50px;
}
img {
margin-top: 25px;
border-radius: 15px;
width: 90%;
height: 490px;
}
iframe {
margin-top: 25px;
border-radius: 15px;
width: 100%;
height: 490px;
}
.thumnail iframe {
width: 1440px;
height: 900px;
}
.thumbnail {
position: relative;
-ms-zoom: 0.75;
-moz-transform: scale(0.75);
-moz-transform-origin: 0 0;
-o-transform: scale(0.75);
-o-transform-origin: 0 0;
-webkit-transform: scale(0.75);
-webkit-transform-origin: 0 0;
}
.thumbnail:after {
content: "";
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
div.img:hover {
border: 1px solid #777;
}
div.img img {
width: 100%;
height: auto;
border-radius: 15px;
}
div.desc {
padding: 5px;
text-align: center;
color: black;
background-color: transparent;
border-radius: 15px;
width: 90%;
}
.imgright {
padding-right: 30px;
}
.imgleft {
padding-left: 70px;
}
.well {
width: 65%;
margin-left: auto;
}
nav,
div.nav {
position: fixed;
z-index: 1024;
top: 0;
left: 0;
right: 0;
overflow: hidden;
ul {
background: black;
text-align: center;
padding: 0.5em;
li {
list-style: none;
display: inline-block;
a {
color: white;
text-decoration: none;
padding: 0.5em;
box-sizing: border-box;
&:hover {
background-color: lightGrey;
color: #333;
transition: all 0.2s;
border-bottom: 0.1em solid black;
}
}
&.active {
a {
background-color: #222;
border-bottom: 0.1em solid #222;
transition: all 0.2s;
&:hover {
background-color: lightGrey;
color: #333;
transition: all 0.2s;
border-bottom: 0.1em solid black;
}
}
}
}
}
}
#submit {
}
.thumbs {
width: auto;
max-width: 100%;
height: 70px;
margin-top: 70px;
}
// Cache selectors
var lastId,
topMenu = $("#topNav"),
topMenuHeight = topMenu.outerHeight(),
// All list items
menuItems = topMenu.find("a"),
// Anchors corresponding to menu items
scrollItems = menuItems.map(function () {
var item = $($(this).attr("href"));
if (item.length) {
return item;
}
});
// Bind click handler to menu items
// so we can get a fancy scroll animation
menuItems.click(function (e) {
var href = $(this).attr("href"),
o = href === "#" ? 0 : $(href).offset().top - topMenuHeight + 15;
$("html, body").stop().animate(
{
scrollTop: o
},
300
);
e.preventDefault();
});
// Bind to scroll
$(window).scroll(function () {
// Get container scroll position
var fromTop = $(this).scrollTop() + topMenuHeight;
// Get id of current scroll item
var cur = scrollItems.map(function () {
if ($(this).offset().top < fromTop) return this;
});
// Get the id of the current element
cur = cur[cur.length - 1];
var id = cur && cur.length ? cur[0].id : "";
if (lastId !== id) {
lastId = id;
// Set/remove active class
menuItems
.parent()
.removeClass("active")
.end()
.filter("[href=#" + id + "]")
.parent()
.addClass("active");
}
});
Also see: Tab Triggers