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.
<!doctype html>
<html lang="pl">
<head>
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/css?family=Rubik:300,400,500" rel="stylesheet">
</head>
<body>
<div class="section light-bg">
<div class="container">
<div class="section-title">
<small>MODERN FRAMEWORK BOOTSTRAP 4</small>
<h3>TABS JUSTIFY</h3>
</div>
<ul class="nav nav-tabs nav-justified" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#communication">Tabs justify 1</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#schedule">Tabs justify 2</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#messages">Tabs justify 3</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#livechat">Tabs justify 4</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade show active" id="communication">
<div class="d-flex flex-column flex-lg-row">
<img data-src="holder.js/150x150/auto" alt="graphic" class="img-fluid rounded align-self-start mr-lg-5 mb-5 mb-lg-0 img-thumbnail">
<div>
<h2>Content tabs justify 1</h2>
<p class="lead">Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer rutrum, urna eu pellentesque pretium, nisi nisi fermentum enim, et sagittis dolor nulla vel sapien. Vestibulum sit amet mattis ante. Ut placerat dui eu nulla
congue tincidunt ac a nibh. Mauris accumsan pulvinar lorem placerat volutpat. Praesent quis facilisis elit. Sed condimentum neque quis ex porttitor,
</p>
<p> malesuada faucibus augue aliquet. Sed elit est, eleifend sed dapibus a, semper a eros. Vestibulum blandit vulputate pharetra. Phasellus lobortis leo a nisl euismod, eu faucibus justo sollicitudin. Mauris consectetur, tortor
sed tempor malesuada, sem nunc porta augue, in dictum arcu tortor id turpis. Proin aliquet vulputate aliquam.
</p>
</div>
</div>
</div>
<div class="tab-pane fade" id="schedule">
<div class="d-flex flex-column flex-lg-row">
<div>
<h2>Content tabs justify 2</h2>
<p class="lead">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer rutrum, urna eu pellentesque pretium, nisi nisi fermentum enim, et sagittis dolor nulla vel sapien. Vestibulum sit amet mattis ante. Ut placerat dui eu nulla
congue tincidunt ac a nibh. Mauris accumsan pulvinar lorem placerat volutpat. Praesent quis facilisis elit. Sed condimentum neque quis ex porttitor,
</p>
<p> malesuada faucibus augue aliquet. Sed elit est, eleifend sed dapibus a, semper a eros. Vestibulum blandit vulputate pharetra. Phasellus lobortis leo a nisl euismod, eu faucibus justo sollicitudin. Mauris consectetur, tortor
sed tempor malesuada, sem nunc porta augue, in dictum arcu tortor id turpis. Proin aliquet vulputate aliquam.
</p>
</div>
<img data-src="holder.js/150x150/auto" alt="graphic" class="img-fluid rounded align-self-start ml-lg-5 mb-5 mb-lg-0 img-thumbnail">
</div>
</div>
<div class="tab-pane fade" id="messages">
<div class="d-flex flex-column flex-lg-row">
<img data-src="holder.js/150x150/auto" alt="graphic" class="img-fluid rounded align-self-start mr-lg-5 mb-5 mb-lg-0 img-thumbnail">
<div>
<h2>Content tabs justify 3</h2>
<p class="lead">Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer rutrum, urna eu pellentesque pretium, nisi nisi fermentum enim, et sagittis dolor nulla vel sapien. Vestibulum sit amet mattis ante. Ut placerat dui eu nulla
congue tincidunt ac a nibh. Mauris accumsan pulvinar lorem placerat volutpat. Praesent quis facilisis elit. Sed condimentum neque quis ex porttitor,
</p>
<p> malesuada faucibus augue aliquet. Sed elit est, eleifend sed dapibus a, semper a eros. Vestibulum blandit vulputate pharetra. Phasellus lobortis leo a nisl euismod, eu faucibus justo sollicitudin. Mauris consectetur, tortor
sed tempor malesuada, sem nunc porta augue, in dictum arcu tortor id turpis. Proin aliquet vulputate aliquam.
</p>
</div>
</div>
</div>
<div class="tab-pane fade" id="livechat">
<div class="d-flex flex-column flex-lg-row">
<div>
<h2>Content tabs justify 4</h2>
<p class="lead">Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer rutrum, urna eu pellentesque pretium, nisi nisi fermentum enim, et sagittis dolor nulla vel sapien. Vestibulum sit amet mattis ante. Ut placerat dui eu nulla
congue tincidunt ac a nibh. Mauris accumsan pulvinar lorem placerat volutpat. Praesent quis facilisis elit. Sed condimentum neque quis ex porttitor,
</p>
<p> malesuada faucibus augue aliquet. Sed elit est, eleifend sed dapibus a, semper a eros. Vestibulum blandit vulputate pharetra. Phasellus lobortis leo a nisl euismod, eu faucibus justo sollicitudin. Mauris consectetur, tortor
sed tempor malesuada, sem nunc porta augue, in dictum arcu tortor id turpis. Proin aliquet vulputate aliquam.
</p>
</div>
<img data-src="holder.js/150x150/auto" alt="graphic" class="img-fluid rounded align-self-start ml-lg-5 mb-5 mb-lg-0 img-thumbnail">
</div>
</div>
</div>
</div>
</div>
<!-- // end .section -->
<div class="section dark-bg">
<div class="container">
<div class="col-md-12">
<div class="section-title">
<small>MODERN FRAMEWORK BOOTSTRAP 4</small>
<h3>TABS ON PLAIN CARD</h3>
</div>
<!-- Tabs on Plain Card -->
<div class="card card-nav-tabs card-plain">
<div class="card-header card-header-danger">
<!-- colors: "header-primary", "header-info", "header-success", "header-warning", "header-danger" -->
<div class="nav-tabs-navigation">
<div class="nav-tabs-wrapper">
<ul class="nav nav-tabs" data-tabs="tabs">
<li class="nav-item">
<a class="nav-link active" href="#home" data-toggle="tab">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#updates" data-toggle="tab">Updates</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#history" data-toggle="tab">History</a>
</li>
</ul>
</div>
</div>
</div>
<div class="card-body ">
<div class="tab-content text-center">
<div class="tab-pane active" id="home">
<p>I think that’s a responsibility that I have, to push possibilities, to show people, this is the level that things could be at. So when you get something that has the name Kanye West on it, it’s supposed to be pushing the furthest possibilities. I will be the leader of a company that ends up being worth billions of dollars, because I got the answers. I understand culture. I am the nucleus.</p>
</div>
<div class="tab-pane" id="updates">
<p> I will be the leader of a company that ends up being worth billions of dollars, because I got the answers. I understand culture. I am the nucleus. I think that’s a responsibility that I have, to push possibilities, to show people, this is the level that things could be at. I think that’s a responsibility that I have, to push possibilities, to show people, this is the level that things could be at. </p>
</div>
<div class="tab-pane" id="history">
<p> I think that’s a responsibility that I have, to push possibilities, to show people, this is the level that things could be at. I will be the leader of a company that ends up being worth billions of dollars, because I got the answers. I understand culture. I am the nucleus. I think that’s a responsibility that I have, to push possibilities, to show people, this is the level that things could be at.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- horizontal -->
<div class="section light-bg">
<div class="container">
<div class="section-title">
<small>MODERN FRAMEWORK BOOTSTRAP 4</small>
<h3>HORIZONTAL TABS</h3>
</div>
<div class="tab-content" id="component-1">
<div class="tab-pane show active" id="component-1-1" role="tabpanel" aria-labelledby="component-1-1">
<div class="component-example">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="nav nav-pills mb-2">
<a class="nav-item nav-link active" data-toggle="tab" href="#demo-1-1">First Tab</a>
<a class="nav-item nav-link" data-toggle="tab" href="#demo-1-2">Second Tab</a>
<a class="nav-item nav-link" data-toggle="tab" href="#demo-1-3">Third Tab</a>
</div>
<div class="tab-content" id="demo-1">
<div class="tab-pane show active" id="demo-1-1" role="tabpanel" aria-labelledby="demo-1-1">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Error maxime minima commodi vel excepturi repudiandae numquam beatae dignissimos quod accusamus ab perferendis, quibusdam, officiis aspernatur aut vero assumenda voluptatum pariatur.</p>
</div>
<div class="tab-pane" id="demo-1-2" role="tabpanel" aria-labelledby="demo-1-2">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat unde veniam qui dicta exercitationem deserunt vel suscipit quas sequi at inventore perferendis aperiam nisi itaque necessitatibus, saepe molestiae iste, accusamus.</p>
</div>
<div class="tab-pane" id="demo-1-3" role="tabpanel" aria-labelledby="demo-1-3">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolor voluptas voluptate, asperiores maiores perspiciatis itaque aliquam ut blanditiis qui!</p>
</div>
</div>
</div>
<div class="col-md-6">
<div class="nav nav-tabs mb-2">
<a class="nav-item nav-link active" data-toggle="tab" href="#demo-2-1">First Tab</a>
<a class="nav-item nav-link" data-toggle="tab" href="#demo-2-2">Second Tab</a>
<a class="nav-item nav-link" data-toggle="tab" href="#demo-2-3">Third Tab</a>
</div>
<div class="tab-content" id="demo-2">
<div class="tab-pane show active" id="demo-2-1" role="tabpanel" aria-labelledby="demo-2-1">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Error maxime minima commodi vel excepturi repudiandae numquam beatae dignissimos quod accusamus ab perferendis, quibusdam, officiis aspernatur aut vero assumenda voluptatum pariatur.</p>
</div>
<div class="tab-pane" id="demo-2-2" role="tabpanel" aria-labelledby="demo-2-2">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat unde veniam qui dicta exercitationem deserunt vel suscipit quas sequi at inventore perferendis aperiam nisi itaque necessitatibus, saepe molestiae iste, accusamus.</p>
</div>
<div class="tab-pane" id="demo-2-3" role="tabpanel" aria-labelledby="demo-2-3">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolor voluptas voluptate, asperiores maiores perspiciatis itaque aliquam ut blanditiis qui! Porro, ad eligendi sequi omnis deleniti obcaecati quod ut, optio eos?</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- / horizontal -->
<div class="section light-bg">
<div class="container">
<div class="section-title">
<small>MODERN FRAMEWORK BOOTSTRAP 4</small>
<h3>HORIZONTAL TABS</h3>
</div>
<ul class="nav nav-tabs nav-justified">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#tab-1-1"><h6>Clean Bootstrap 4 tab 1</h6></a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#tab-1-2"><h6>Clean Bootstrap 4 tab 2</h6></a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#tab-1-3"><h6>Clean Bootstrap 4 tab 3</h6></a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane show active" id="tab-1-1">
Content tab 1
</div>
<div class="tab-pane" id="tab-1-2">
Content tab 2
</div>
<div class="tab-pane" id="tab-1-3">
Content tab 3
</div>
</div>
</div>
</div>
</body>
</html>
body {
font-family: 'Rubik', sans-serif;
position: relative;
}
.light-bg {
background-color: #faf6fb;
}
.dark-bg {
background-color: #0a0a0a;
}
p.lead {
color: #8fc400;
margin-bottom: 2rem;
}
.section {
padding: 80px 0;
}
.section-title {
text-align: center;
margin-bottom: 3rem;
}
.section-title small {
color: #00bfff;
}
.img-thumbnail {
border-color: #00bfff;
}
@media (max-width:767px) {
h1 {
font-size: 40px;
}
h2 {
font-size: 30px;
}
}
/* TABS
----------------------*/
.tab-content {
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
background-color: #FFF;
box-shadow: 0px 5px 7px 0px rgba(0, 0, 0, 0.04);
padding: 3rem;
}
@media (max-width:992px) {
.tab-content {
padding: 1.5rem;
}
}
.tab-content p {
line-height: 1.8;
}
.tab-content h2 {
margin-bottom: 0.5rem;
}
.nav-tabs {
border-bottom: 0;
}
.nav-tabs .nav-item .nav-link,
.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover {
padding: 1rem 1rem;
border-color: #faf6fb #faf6fb #FFF;
font-size: 19px;
color: #b5a4c8;
background: #f5eff7;
}
.nav-tabs .nav-link.active {
background: #FFF;
border-top-width: 3px;
border-color: #12b5e5 #faf6fb #FFF;
color: #12b5e5;
}
@media (max-width:650px) {
.nav-tabs {
display: block;
}
}
$(function() {
"use strict";
$('a[href*="#"]').on('click', function(event) {
{
// Figure out element to scroll to
var target = $(this);
target = target.length ? target : $('[name=' + this.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
}, 1000, 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
};
});
}
}
});
}); /* End Fn */
Also see: Tab Triggers