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.
<header>
<div class="container">
<h1>Bootstrap</h1>
<h3>Timeline</h3>
</div>
</header>
<nav class="navbar navbar-default no-margin no-border no-radius">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-i">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#home">Home</a>
</div>
<div class="collapse navbar-collapse" id="navbar-i">
<ul class="nav navbar-nav navbar-right">
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
</ul>
</div>
</div>
</nav>
<main id="home" class="contents">
<div class="container">
<h3 class="page-title text-center">Timeline</h3>
<ul class="timeline">
<li class="timeline-line"></li>
<li class="timeline-group">
<a href="#" class="btn btn-primary"><i class="fa fa-calendar"></i> Today</a>
</li>
</ul>
<ul class="timeline">
<li class="timeline-line"></li>
<li class="timeline-item">
<div class="timeline-badge"><a href="#"></a></div>
<div class="timeline-panel">
<div class="timeline-heading">
Minor Update
<div class="timeline-date"><i class="fa fa-clock-o"></i> November 7, 2015</div>
</div>
<div class="timeline-content">
<ul>
<li><code>CSS</code> added line 205 to 207 for <i>timeline date</i></li>
<li><code>CSS</code> changed line @ 269 from <i>1199px to 991px</i></li>
<li><code>HTML</code> + <code>CSS</code> and many more ... </li>
</ul>
</div>
<div class="timeline-footer">
<small class="text-muted">Timeline Footer</small>
</div>
</div>
</li>
<li class="timeline-item">
<div class="timeline-badge"><a href="#"></a></div>
<div class="timeline-panel">
<div class="timeline-heading">Welcome to GongKia Timeline</div>
<div class="timeline-content">
<p>Eu pid nunc urna integer, sed, cras tortor scelerisque penatibus facilisis a pulvinar, rhoncus sagittis ut nunc elit! Sociis in et? Rhoncus, vel dignissim in scelerisque. Dolor lacus pulvinar adipiscing adipiscing montes! Elementum risus adipiscing non, cras scelerisque risus penatibus? Massa vut, habitasse, tincidunt!</p>
<p>Eu pid nunc urna integer, sed, cras tortor scelerisque penatibus facilisis a pulvinar, rhoncus sagittis ut nunc elit! Sociis in et?</p>
</div>
</div>
</li>
<li class="timeline-item">
<div class="timeline-badge"><a href="#"></a></div>
<div class="timeline-panel">
<div id="about" class="timeline-heading">About Timeline</div>
<div class="timeline-content">
<p><img class="img-responsive" src="http://placeimg.com/640/240/people"></p>
<p>Rubber cheese say cheese bocconcini. Caerphilly cheese and biscuits squirty cheese airedale lancashire cheese and biscuits rubber cheese squirty cheese. Ricotta fromage frais port-salut danish fontina cream cheese queso edam ricotta. Gouda monterey jack blue castello stilton rubber cheese.</p>
</div>
</div>
</li>
<li class="timeline-item">
<div class="timeline-badge"><a href="#"></a></div>
<div class="timeline-panel">
<div id="services" class="timeline-heading">Services Timeline</div>
<div class="timeline-content">
<p>Eu pid nunc urna integer, sed, cras tortor scelerisque penatibus facilisis a pulvinar, rhoncus sagittis ut nunc elit! Sociis in et? Rhoncus, vel dignissim in scelerisque. Dolor lacus pulvinar adipiscing adipiscing montes! Elementum risus adipiscing non, cras scelerisque risus penatibus? Massa vut, habitasse, tincidunt!</p>
<div class="row services-list">
<div class="col-xs-4"><img class="thumbnail img-responsive" src="http://placeimg.com/640/640/tech"></div>
<div class="col-xs-4"><img class="thumbnail img-responsive" src="http://placeimg.com/640/640/tech"></div>
<div class="col-xs-4"><img class="thumbnail img-responsive" src="http://placeimg.com/640/640/tech"></div>
</div>
<p>Cottage cheese rubber cheese everyone loves. Cow monterey jack cheesy grin cauliflower cheese cheesy feet mozzarella emmental blue castello. Lancashire boursin blue castello taleggio babybel bocconcini fondue cheese triangles. Fromage frais cheese strings airedale boursin st. agur blue cheese squirty cheese pecorino.</p>
</div>
</div>
</li>
<li class="timeline-item">
<div class="timeline-badge"><a href="#"></a></div>
<div class="timeline-panel">
<div class="timeline-heading">Media Timeline</div>
<div class="timeline-content">
<p>Eu pid nunc urna integer, sed, cras tortor scelerisque penatibus facilisis a pulvinar, rhoncus sagittis ut nunc elit! Sociis in et? Rhoncus, vel dignissim in scelerisque. Dolor lacus pulvinar adipiscing adipiscing montes! Elementum risus adipiscing non, cras scelerisque risus penatibus? Massa vut, habitasse, tincidunt!</p>
<div class="timeline-embed">
<iframe width="478" height="320" src="https://www.youtube.com/embed/G7q07dyIsX8?list=RDEMeI4zMDi6uvY6C8nWWWoZ1A&showinfo=0" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
</li>
<li class="timeline-item">
<div class="timeline-badge"><a href="#"></a></div>
<div class="timeline-panel">
<div class="timeline-heading">Contact Us Timeline</div>
<div class="timeline-content">
<p>Eu pid nunc urna integer, sed, cras tortor scelerisque penatibus facilisis a pulvinar, rhoncus sagittis ut nunc elit! Sociis in et? Rhoncus, vel dignissim in scelerisque. Dolor lacus pulvinar adipiscing adipiscing montes! Elementum risus adipiscing non, cras scelerisque risus penatibus? Massa vut, habitasse, tincidunt!</p>
<div class="timeline-embed">
<iframe src="https://www.google.com/maps/embed?pb=!1m10!1m8!1m3!1d15936.386801163795!2d101.61008935000001!3d3.0688275999999997!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2smy!4v1446881552869" width="478" height="320" frameborder="0" style="border:0" allowfullscreen></iframe>
</div>
</div>
</div>
</li>
</ul>
<ul class="timeline">
<li class="timeline-line"></li>
<li class="timeline-group">
<a href="#" class="btn btn-primary"><i class="fa fa-calendar"></i> 2014</a>
</li>
</ul>
<ul class="timeline">
<li class="timeline-line"></li><!-- /.timeline-line -->
<li class="timeline-item block">
<div class="timeline-badge"><a rel="tooltip" title="" data-context="inverse" data-container="body" class="border-silc" href="#" data-original-title="block highlight"></a></div>
<div class="timeline-panel">
<div class="timeline-content">
<div class="text-center">
<p>
<a href="#" class="kit-avatar kit-avatar-64">
<i class="fa fa-android" style="font-size:64px;"></i>
</a>
</p>
<h4>Become GongKia</h4>
<p class="timeline-date">November 1, 2014</p>
<p>Eu pid nunc urna integer, sed, cras tortor scelerisque penatibus facilisis a pulvinar, rhoncus sagittis ut nunc elit! Sociis in et? Rhoncus, vel dignissim in scelerisque. Dolor lacus pulvinar adipiscing adipiscing montes! Elementum risus adipiscing non, cras scelerisque risus penatibus? Massa vut, habitasse, tincidunt!</p>
<div class="timeline-embed">
<iframe src="https://www.google.com/maps/embed?pb=!1m10!1m8!1m3!1d15936.386801163795!2d101.61008935000001!3d3.0688275999999997!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2smy!4v1446881552869" width="478" height="320" frameborder="0" style="border:0" allowfullscreen></iframe>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</main>
html { min-height: 100%; position: relative; }
body { margin-bottom: 60px; }
.btn, .btn:hover, .btn:focus, .btn:active, .btn:active:focus { outline: 0; }
.btn-custom { margin-bottom: 1em; }
.no-margin { margin: 0; }
.no-padding { padding: 0; }
.no-border { border: 0; }
.no-radius { border-radius: 0; }
/*** Header ***/
header { padding: 30px 0; background-color: #6f5499; color: #fff; }
header h1 { margin: 0; }
header h3 { margin: 0; color: rgba(255,255,255,.4); }
/*** Nav ***/
.navbar-default { background-color: #f5f5f5; box-shadow: 0 1px 0 0 rgba(0,0,0,0.1); }
.navbar-default .nav>li>a:focus,
.navbar-default .nav>li>a:hover { background-color: #e5e5e5; }
/*** Content ***/
main {}
.i-row { padding-top: 40px; padding-bottom: 40px; }
.i-row-odd { background-color: #f2f2f2; }
.i-row-even { background-color: #e8e8e8; }
.section-title { margin-top: 0; margin-bottom: 0.6em; font-weight: 500; }
.section-title .fa { margin-right: 5px; color: #6f5499; }
/*** Footer ***/
footer { padding: 20px 0; background-color: #333; position: absolute; bottom: 0; width: 100%; height: 60px; }
/******************************************/
/* Other */
.services-list {
margin: 0 -5px;
padding: 0;
list-style: none;
}
.services-list > div {
padding-left: 5px;
padding-right: 5px;
}
/* Timeline */
.timeline {
position: relative;
display: block;
margin: 0;
padding: 10px 0;
}
.timeline:after, .timeline:before {
content: " ";
display: table;
}
.timeline:after {
clear: both;
}
.timeline, .timeline>li {
list-style: none;
}
.timeline>li:nth-child(even) {
float: left;
clear: left;
}
.timeline>li:nth-child(odd) {
float: right;
clear: right;
}
.timeline-line {
display: inline-block;
position: absolute;
top: 0;
bottom: 0;
left: 50%;
width: 4px;
background-color: #eee;
-webkit-transform: translate(-50%, 0);
transform: translate(-50%, 0);
}
.timeline-line+.timeline-item {
margin-top: -20px;
}
.timeline-group {
display: block;
position: relative;
margin: 20px 0;
text-align: center;
float: none!important;
z-index: 1;
}
.timeline-poster {
margin-top: -20px;
}
.timeline-poster .btn-link {
color: #a1aab0;
}
.timeline-poster .btn-link.active, .timeline-poster .btn-link:active, .timeline-poster .btn-link:focus, .timeline-poster .btn-link:hover {
color: #3e5771;
}
.timeline-item {
position: relative;
display: inline-block;
width: 50%;
padding: 0 30px 20px;
}
.timeline-item:nth-child(even):after, .timeline-item:nth-child(even):before {
content: '';
position: absolute;
right: 19px;
top: 10px;
width: 0;
height: 0;
border-top: 12px solid transparent;
border-bottom: 12px solid transparent;
border-left: 12px solid #ccc;
z-index: 1;
}
.timeline-item:nth-child(even):after {
right: 20px;
top: 11px;
border-top: 11px solid transparent;
border-bottom: 11px solid transparent;
border-left: 11px solid #fff;
}
.timeline-item:nth-child(even)>.timeline-badge {
right: -6px;
}
.timeline-item:nth-child(odd):after, .timeline-item:nth-child(odd):before {
content: '';
position: absolute;
left: 19px;
top: 10px;
width: 0;
height: 0;
border-top: 12px solid transparent;
border-bottom: 12px solid transparent;
border-right: 12px solid #ccc;
z-index: 1;
}
.timeline-item:nth-child(odd):after {
left: 20px;
top: 11px;
border-top: 11px solid transparent;
border-bottom: 11px solid transparent;
border-right: 11px solid #fff;
}
.timeline-item:nth-child(odd)>.timeline-badge {
left: -6px;
}
.timeline-item.block:nth-child(even), .timeline-item.block:nth-child(odd) {
width: 100%;
margin-top: 5px;
}
.timeline-item.block:nth-child(even):after, .timeline-item.block:nth-child(even):before, .timeline-item.block:nth-child(odd):after, .timeline-item.block:nth-child(odd):before {
left: 50%;
right: auto;
top: -11px;
border: 0;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
border-bottom: 12px solid #ccc;
-webkit-transform: translate(-50%, 0);
transform: translate(-50%, 0);
}
.timeline-item.block:nth-child(even):after, .timeline-item.block:nth-child(odd):after {
top: -10px;
border: 0;
border-left: 11px solid transparent;
border-right: 11px solid transparent;
border-bottom: 11px solid #fff;
}
.timeline-item.block:nth-child(even)>.timeline-badge, .timeline-item.block:nth-child(odd)>.timeline-badge {
top: -28px;
left: 50%;
right: auto;
-webkit-transform: translate(-50%, 0);
transform: translate(-50%, 0);
}
.timeline-item>.timeline-badge {
position: absolute;
top: 12px;
z-index: 1;
}
.timeline-item>.timeline-badge>a {
display: inline-block;
width: 12px;
height: 12px;
border: 2px solid #999;
border-radius: 24px;
background-color: #fff;
text-decoration: none;
transition: all ease .3s;
}
.timeline-item>.timeline-badge>a.active, .timeline-item>.timeline-badge>a:active, .timeline-item>.timeline-badge>a:focus, .timeline-item>.timeline-badge>a:hover {
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
.timeline-item>.timeline-panel {
position: relative;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 4px;
}
.timeline-item>.timeline-panel:hover .timeline-actions {
display: block;
}
.timeline-actions {
display: none;
}
.timeline-content, .timeline-footer, .timeline-heading, .timeline-liveliness {
padding: 15px;
}
.timeline-heading+.timeline-content {
padding-top: 0;
}
.timeline-date {
font-size: 14px;
color: #aaa;
}
.timeline-embed {
position: relative;
padding-bottom: 56.25%;
padding-top: 25px;
height: 0;
}
.timeline-embed .embed-element, .timeline-embed embed, .timeline-embed iframe, .timeline-embed object {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%}
.timeline-img {
display: block;
padding: 5px 0;
}
.timeline-img.first {
margin-right: -10px;
}
.timeline-img.middle {
margin-right: -10px;
margin-left: -10px;
}
.timeline-img.last {
margin-left: -10px;
}
.timeline-footer, .timeline-liveliness, .timeline-resume {
border-top: 1px solid #eee;
background-color: #fbfcfc;
}
.timeline-footer {
border-radius: 0 0 5px 5px;
}
.timeline-avatar {
margin-top: -2px;
margin-right: 10px;
}
.timeline-title {
margin: 0;
padding: 0;
font-size: 14px;
line-height: 1.42857;
font-weight: 600;
color: #3e5771;
text-decoration: none;
}
.timeline-title>small {
display: block;
font-size: 12px;
line-height: 1.5;
color: #a1aab0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.timeline .media {
border-bottom: 1px solid #eee;
}
.timeline .media, .timeline .media p {
font-size: 13px;
}
.timeline .media:last-child {
border-bottom: 0;
}
@media (max-width:991px) {
.timeline {
padding-left: 15px;
}
.timeline-line {
left: 15px;
}
.timeline-group {
display: inline-block;
margin-left: 4px;
}
.timeline-item {
width: 100%;
margin-top: 0!important;
padding-right: 10px;
}
.timeline-item.block:nth-child(even), .timeline-item.block:nth-child(odd) {
padding-bottom: 0;
}
.timeline-item.block:nth-child(even):after, .timeline-item.block:nth-child(even):before, .timeline-item.block:nth-child(odd):after, .timeline-item.block:nth-child(odd):before, .timeline-item:nth-child(even):after, .timeline-item:nth-child(even):before, .timeline-item:nth-child(odd):after, .timeline-item:nth-child(odd):before {
left: 19px;
top: 10px;
border: 0;
border-top: 12px solid transparent;
border-bottom: 12px solid transparent;
border-right: 12px solid #ccc;
-webkit-transform: translate(0, 0);
transform: translate(0, 0);
}
.timeline-item.block:nth-child(even):after, .timeline-item.block:nth-child(odd):after, .timeline-item:nth-child(even):after, .timeline-item:nth-child(odd):after {
left: 20px;
top: 11px;
border-top: 11px solid transparent;
border-bottom: 11px solid transparent;
border-right: 11px solid #fff;
}
.timeline-item.block:nth-child(even)>.timeline-badge, .timeline-item.block:nth-child(odd)>.timeline-badge, .timeline-item:nth-child(even)>.timeline-badge, .timeline-item:nth-child(odd)>.timeline-badge {
top: 12px;
left: -6px;
right: auto;
-webkit-transform: translate(0, 0);
transform: translate(0, 0);
}
}@media (max-width:480px) {
.timeline {
padding: 0;
}
.timeline-line {
display: none;
}
.timeline-item {
display: block;
padding: 0 0 20px!important;
}
.timeline-item.block:nth-child(even), .timeline-item.block:nth-child(odd), .timeline-item:nth-child(even), .timeline-item:nth-child(odd) {
float: none;
clear: both;
}
.timeline-item.block:nth-child(even):after, .timeline-item.block:nth-child(even):before, .timeline-item.block:nth-child(odd):after, .timeline-item.block:nth-child(odd):before, .timeline-item.timeline-poster>.timeline-badge, .timeline-item:nth-child(even):after, .timeline-item:nth-child(even):before, .timeline-item:nth-child(odd):after, .timeline-item:nth-child(odd):before {
display: none;
}
.timeline-item>.timeline-badge {
top: -8px!important;
left: 50%!important;
margin-left: -6px;
}
}.wrapkit-content-rtl .timeline-avatar {
margin-right: 0;
margin-left: 10px;
}
.timeline-heading { font-size: 20px; }
$(function () {
// Smooth Scroll
$('a[href*=#]').bind('click', function(e){
var anchor = $(this);
$('html, body').stop().animate({
scrollTop: $(anchor.attr('href')).offset().top
}, 1000);
e.preventDefault();
});
});
Also see: Tab Triggers