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 class="container-fluid header-bg" id="home">
<nav class="navbar navbar-toggleable-md navbar-light bg-faded fixed-top">
<div class="container">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand wow fadeInLeft" href="#">FOUND</a>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto wow fadeInRight">
<li class="nav-item active">
<a class="nav-link" href="#home">HOME <span class="sr-only">(current)</span></a
>
</li>
<li class="nav-item">
<a class="nav-link" href="#compo">COMPONENTS</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#download">DOWNLOAD</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#link">LINKS</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#contact">CONTACT</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container desc-main wow fadeInUp">
<div class="row">
<div class="col-md-8">
<h1 class="display-3">Built by designers, tailored for you.</h1>
<p class="lead">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus ut, obcaecati accusamus aspernatur dolore. Architecto delectus iusto soluta earum sit veritatis, sapiente, voluptas provident debitis veniam atque repellendus sed perspiciatis.
</p>
<a href="#"><img src="https://drive.google.com/uc?id=1TD3o0DRWfjRYSLd2P0ql3O1AN9CPFXkE"/></a>
</div>
</div>
</div>
</div>
<!--Components-->
<div class="container components" id="compo">
<div class="row">
<div class="col-md-4 wow fadeInLeft">
<h5>Share Something Meaningful With Your Loved Ones</h5>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti nihil reiciendis alias facilis aspernatur veniam eligendi, perspiciatis ducimus quasi!
</p>
<h5>Share Something Meaningful With Your Loved Ones</h5>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti nihil reiciendis alias facilis aspernatur veniam eligendi, perspiciatis ducimus quasi!
</p>
</div>
<div class="col-md-4 wow fadeInUp">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<img class="d-block img-fluid watch" src="https://drive.google.com/uc?id=1ffBm92Qk02ZzWbT7pazeJbPbqX7rxKJc" alt="First slide" />
</div>
<div class="carousel-item">
<img class="d-block img-fluid watch" src="https://drive.google.com/uc?id=1ffBm92Qk02ZzWbT7pazeJbPbqX7rxKJc" alt="Second slide" />
</div>
<div class="carousel-item">
<img class="d-block img-fluid watch" src="https://drive.google.com/uc?id=1ffBm92Qk02ZzWbT7pazeJbPbqX7rxKJc" alt="Third slide" />
</div>
</div>
</div>
</div>
<div class="col-md-4 wow fadeInRight">
<h5>Share Something Meaningful With Your Loved Ones</h5>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti nihil reiciendis alias facilis aspernatur veniam eligendi, perspiciatis ducimus quasi!
</p>
<h5>Share Something Meaningful With Your Loved Ones</h5>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti nihil reiciendis alias facilis aspernatur veniam eligendi, perspiciatis ducimus quasi!
</p>
</div>
</div>
</div>
<!--DOWNLOAD-->
<div class="container-fluid download-bg wow fadeInUp" id="download">
<div class="container">
<div class="row justify-content-end">
<div class="col-md-5">
<h3>Small Screen, Big Ideas</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quia explicabo earum dolore voluptatibus esse, enim aliquid cumque a pariatur nisi, aspernatur placeat animi officia reprehenderit quasi ut voluptates optio ratione?
</p>
</div>
</div>
</div>
</div>
<!--LINKS-->
<div class="container links" id="link">
<div class="row">
<div class="col-md-6 wow fadeInLeft">
<h5>Small Watch, Big Time!</h5>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptas vero odio quae quos. Consequatur explicabo illum, neque, nobis blanditiis sapiente.
</p>
<h5>Small Watch, Big Time!</h5>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptas vero odio quae quos. Consequatur explicabo illum, neque, nobis blanditiis sapiente.
</p>
</div>
<div class="col-md-6">
<img class="img-fluid wow fadeInRight" src="https://drive.google.com/uc?id=1TPbGx5egyh-bSBqOS-oDUjwPZ_XRH9LB" />
</div>
</div>
</div>
<!--CONTACT-->
<div class="container-fluid contact-us" id="contact">
<div class="container">
<h1 class="display-3 wow fadeInUp">Go On! Contact Us</h1>
<p class="lead">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa, velit, at. Ea officiis ullam, qui cum cumque mollitia vel, sed autem esse sint unde voluptatem, sapiente doloremque tenetur ipsa illum.
</p>
<form>
<div class="form-group wow fadeInUp">
<label for="formGroupExampleInput">Example label</label>
<input type="text" class="form-control" id="formGroupExampleInput" placeholder="Example input" />
</div>
<div class="form-group">
<label for="formGroupExampleInput2">Another label</label>
<input type="text" class="form-control" id="formGroupExampleInput2" placeholder="Another input" />
</div>
</form>
</div>
</div>
<div class="footer">
<div class="container">
<h5>Copyright - FOUND</h5>
</div>
</div>
html,
body {
font-family: "Roboto", sans-serif;
overflow-x: hidden;
}
.header-bg {
background: linear-gradient(to left, rgba(33, 33, 33, 0.27), rgb(33, 33, 33)),
url(https://drive.google.com/uc?id=1F551BczAVhB-dMv1feecZJ6Wprnu1wT6);
background-size: cover;
background-position: center;
background-attachment: fixed;
color: #fff;
}
.navbar {
background: transparent;
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}
.navbar-toggler {
background: #fff;
border: 1px solid #fff;
border-radius: 0px;
}
.navbar-brand {
font-size: 2rem;
font-weight: 900i;
font-style: italic;
letter-spacing: 5px;
color: #fff !important;
}
.nav-link {
color: #fff !important;
font-size: 0.8rem;
}
.nav-item {
padding-right: 1rem;
}
.desc-main {
padding-top: 10rem;
padding-bottom: 5rem;
}
.desc-main p {
padding-top: 3rem;
font-weight: 100;
}
.desc-main img {
max-height: 50px;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
}
.display-3 {
font-weight: 100;
}
.components {
padding-top: 5rem;
padding-bottom: 5rem;
color: #333;
}
.components h5,
p {
margin-top: 2rem;
font-weight: 300;
}
.components h5 {
font-weight: 700;
letter-spacing: 2px;
font-size: 1rem;
}
.watch {
height: 100%;
width: 100%;
margin-top: 2rem;
margin-bottom: 2rem;
}
.carousel-indicators {
margin-bottom: -1rem;
}
.carousel-indicators li {
background: #333;
margin-top: 3rem;
}
.carousel-indicators .active {
background: #4eafeb;
}
.download-bg {
background: linear-gradient(to right, rgba(0, 0, 0, 0), rgb(33, 33, 33)),
url("https://drive.google.com/uc?id=16AN_C6O6URgrjj-RTOnfB3hhXL7FtC2U");
background-size: cover;
background-position: center;
background-attachment: fixed;
padding-top: 5rem;
padding-bottom: 5rem;
color: #fff;
}
.links {
padding-top: 5rem;
padding-bottom: 5rem;
}
.links h5 {
margin-top: 3rem;
}
.links img {
height: 100%;
width: 75%;
float: right;
}
.contact-us {
text-align: center;
color: #fff;
background: #333;
padding-top: 5rem;
padding-bottom: 5rem;
}
.contact-us p {
font-weight: 100;
}
.form-control {
display: block;
width: 100%;
padding: 0.5rem 0.75rem;
font-size: 1rem;
line-height: 1.25;
color: #ffffff;
background-color: transparent;
background-image: none;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 1px solid rgb(255, 255, 255);
border-radius: 0rem !important;
}
form {
margin-top: 4rem;
}
.footer {
padding-top: 2rem;
padding-bottom: 2rem;
color: #333;
text-align: center;
}
.footer h5 {
font-weight: 100;
}
/*Media Queries */
@media (max-width: 767px) {
.navbar .container {
width: 100%;
}
}
$('a[href*="#"]')
// Remove links that don't actually link to anything
.not('[href="#"]')
.not('[href="#0"]')
.click(function(event) {
// On-page links
if (
location.pathname.replace(/^\//, "") ==
this.pathname.replace(/^\//, "") &&
location.hostname == this.hostname
) {
// Figure out element to scroll to
var target = $(this.hash);
target = target.length ? target : $("[name=" + this.hash.slice(1) + "]");
// Does a scroll target exist?
if (target.length) {
// Only prevent default if animation is actually gonna happen
event.preventDefault();
$("html, body").animate(
{
scrollTop: target.offset().top
},
500,
function() {
// Callback after animation
// Must change focus!
var $target = $(target);
$target.focus();
if ($target.is(":focus")) {
// Checking if the target was focused
return false;
} else {
$target.attr("tabindex", "-1"); // Adding tabindex for elements not focusable
$target.focus(); // Set focus again
}
}
);
}
}
});
$(document).ready(function() {
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll > 50) {
$(".navbar").css("background", "#333");
} else {
$(".navbar").css("background", "transparent");
}
});
});
new WOW().init();
Also see: Tab Triggers