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.
<section id="videos">
<div class="container-fluid">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 class="text-primary">Video Highlights</h1>
<p>Voluptate laborum nulla do pariatur exercitation. Aliquip esse ut ipsum nisi nostrud excepteur magna reprehenderit qui. Cillum adipisicing eiusmod culpa commodo officia mollit ipsum. Velit sit culpa incididunt nostrud magna.</p><hr>
</div>
</div>
<div class="row">
<div id="event-vid1" class="col-md-4 event-vid"><button type="button" class="gradient-css" role="button" data-toggle="modal" data-target="#myModal1"><i data-feather="play-circle"></i> Play</button></div>
<div id="event-vid2" class="col-md-4 event-vid"><button type="button" class="gradient-css" data-toggle="modal" data-target="#myModal2"><i data-feather="play-circle"></i> Play</button></div>
<div id="event-vid3" class="col-md-4 event-vid"><button type="button" id="modalBtn3" class="gradient-css" data-toggle="modal" data-target="#myModal3"><i data-feather="play-circle"></i> Play</button></div>
</div>
</div>
<!-- Modal1 -->
<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content">
<div class="modal-body">
<div id="ytplayer1"></div>
</div>
</div>
</div>
</div>
<!-- Modal2 -->
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content">
<div class="modal-body">
<div id="ytplayer2"></div>
</div>
</div>
</div>
</div>
<!-- Modal2 -->
<div class="modal fade" id="myModal3" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content">
<div class="modal-body">
<div id="ytplayer3"></div>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="industries">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="container">
<div class="row text-center">
<div class="col-md-12">
<h1 class="text-primary foo">Industries We Cover</h1>
<p class="foo">Consequat voluptate mollit sint irure laboris adipisicing ullamco proident commodo Lorem ex fugiat.</p>
<br>
</div>
</div>
<div class="row">
<div class="col industries"><i class="fas fa-cogs"></i><div class="shadow-letter"></div>
<img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png">
<div class="industry-name"><span>Technology</span></div>
</div>
<div class="col industries"><i class="fas fa-stethoscope"></i>
<img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"> <div class="industry-name"><span>Life Sciences / Healthcare</span></div></div>
<div class="col industries"><i class="fas fa-leaf"></i> <img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"><div class="industry-name"><span>CleanTech</span></div></div>
<div class="col industries"><i class="fas fa-bolt"></i> <img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"><div class="industry-name"><span>Energy Generation</span></div></div>
<div class="col industries"><i class="fas fa-graduation-cap"></i> <img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"><div class="industry-name"><span>EdTech</span></div></div>
</div>
<div class="row">
<div class="col industries"><i class="fas fa-mobile-alt"></i><div class="shadow-letter"></div>
<img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png">
<div class="industry-name"><span>Mobile</span></div>
</div>
<div class="col industries"><i class="fas fa-pills"></i>
<img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"> <div class="industry-name"><span>Drug Discovery</span></div></div>
<div class="col industries"><i class="fas fa-tint"></i> <img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"><div class="industry-name"><span>Water & Wastewater</span></div></div>
<div class="col industries"><i class="fas fa-solar-panel"></i> <img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"><div class="industry-name"><span>Energy Efficiency</span></div></div>
<div class="col industries"><i class="fas fa-book-open"></i> <img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"><div class="industry-name"><span>Digital Textbooks</span></div></div>
</div>
<div class="row">
<div class="col industries"><i class="fas fa-user-secret"></i><div class="shadow-letter"></div>
<img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png">
<div class="industry-name"><span>Security</span></div>
</div>
<div class="col industries"><i class="fas fa-flask"></i>
<img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"> <div class="industry-name"><span>BioTech</span></div></div>
<div class="col industries"><i class="fas fa-laptop"></i> <img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"><div class="industry-name"><span>Internet / Digital Media</span></div></div>
<div class="col industries"><i class="fas fa-car"></i> <img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"><div class="industry-name"><span>Transportation</span></div></div>
<div class="col industries"><i class="fas fa-hand-holding-usd"></i> <img src="http://blog.youngstartup.com/wp-content/uploads/2018/07/shadow.png"><div class="industry-name"><span>FinTech</span></div></div>
</div>
<div class="row text-center">
<div class="col-md-12">
<h1 class="text-primary" style="padding-top: 30px;">Rich Content</h1>
<p>Nunc id libero eget eros feugiat aliquet quis at ex. Cras lobortis, ipsum eu elementum sagittis, felis sem iaculis magna, nec blandit magna metus sed ex. Etiam purus nisi, auctor eu dolor interdum, sodales suscipit nisl. Ut ac ornare quam. Quisque nec vestibulum dui. Donec a sodales ipsum. Nullam eget eros ac mi ullamcorper vulputate eu a ipsum.</p>
</div></div>
</div>
</div>
</div>
</div>
</section>
<div class="fixed-bottom bg-white text-dark">
<div class="container">
<div class="row text-center">
<div class="col-md-12">
Text Here
</div>
</div>
</div>
</div>
</div>
#videos {
background-color: #dae2e0;
text-align: center;
padding: 40px 0px;
}
#videos .text-primary, #industries .text-primary {
color: #25A8DF!important;
}
#videos h1, #industries h1 {
text-transform: uppercase;
}
a:hover {
text-decoration: none;
}
#videos > .container {
text-align: center;
padding: 30px;
}
.feather{
vertical-align: middle;
width: 30px;
height: 30px;
padding-bottom:5px;
}
.feather:hover {
color: #fff;
}
#event-vid1 {
background: linear-gradient(to left, rgba(0, 0, 0, .6) 50%, rgba(0, 0, 0, .5) 100%), url(http://blog.youngstartup.com/wp-content/uploads/2018/07/vid1-1.jpg);
background-repeat: no-repeat;
background-size: cover;
}
#event-vid2 {
background: linear-gradient(to left, rgba(0, 0, 0, .6) 50%, rgba(0, 0, 0, .5) 100%), url(http://blog.youngstartup.com/wp-content/uploads/2018/07/vid2.jpg);
background-repeat: no-repeat;
background-size: cover;
}
#event-vid3 {
background: linear-gradient(to left, rgba(0, 0, 0, .6) 50%, rgba(0, 0, 0, .5) 100%), url(http://blog.youngstartup.com/wp-content/uploads/2018/07/vid3.jpg);
background-repeat: no-repeat;
background-size: cover;
}
.event-vid {
width: 100%;
padding-top: 80px;
height: 200px;
-moz-box-shadow: inset 0 0 10px #dae2e0;
-webkit-box-shadow: inset 0 0 10px #dae2e0;
box-shadow: inset 20px 0 0 #dae2e0;
margin-top:10px;
cursor: pointer;
/* filter: grayscale(100%); */
}
.gradient-css {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
width: 110px;
height: 35px;
cursor: pointer;
margin: 0 auto;
border: 2.3px solid #00E7FF;
-webkit-border-radius: 40px;
border-radius: 40px;
font: normal 20px/30px "Advent Pro", Helvetica, sans-serif;
font-weight: bold;
color: #00E7FF;
text-align: center;
vertical-align: middle;
-o-text-overflow: clip;
text-overflow: clip;
letter-spacing: 1px;
background: rgba(0,0,0,0);
-webkit-transition: background-color 0.3s cubic-bezier(0, 0, 0, 0), color 0.3s cubic-bezier(0, 0, 0, 0), width 0.3s cubic-bezier(0, 0, 0, 0), border-width 0.3s cubic-bezier(0, 0, 0, 0), border-color 0.3s cubic-bezier(0, 0, 0, 0);
transition: .5s;
}
.gradient-css:hover {
color: rgba(255,255,255,1);
background: linear-gradient(to left, #00E7FF, #25A8DF);
}
.gradient-css:active {
background: linear-gradient(to left, #00E7FF, #3273dc);
background: linear-gradient(to left, #00E7FF, #3273dc);
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
transition: none;
}
#industries {
padding: 30px 0px;
}
.industries {
/* border: solid 2px #00E7FF; */
margin: 10px;
padding: 0;
border-radius: 5px;
text-align: center;
-webkit-box-shadow: 0px 0px 22px 0px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 22px 0px rgba(0,0,0,0.75);
box-shadow: 0px 0px 22px 0px rgba(0,0,0,0.75);
}
.industries .fas {
font-size: 3rem;
padding: 20px 5px 40px;
background: -webkit-linear-gradient(#00E7FF, #3273dc);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.industry-name {
width: 100%;
height: -webkit-fill-available;
max-height: 35px;
vertical-align: middle;
margin: 0;
border-radius: 0 0 5px 5px;
color: #fff;
background: linear-gradient(to left, #00E7FF, #3273dc);
}
.industries img {
padding: 0 70px 10px;
filter: blur(5px);
}
.industry-name span {
padding: 5px;
vertical-align: -webkit-baseline-middle;
line-height: .1;
}
@media only screen and (max-width: 1000px){
.industry-name {
max-height: 55px;
}
.industries img {
display: none;
}
}
@media only screen and (max-width: 800px){
.industry-name {
max-height: 80px;
}
}
feather.replace();
// info for the video players
var yt1, yt2, yt3;
yt1 = {
"div" : "#event-vid1",
"modal": "#myModal1",
"videoId": "WdeFxB_ZibU"
};
yt2 = {
"div" : "#event-vid2",
"modal": "#myModal2",
"videoId": "bx8wnsLRC1g"
};
yt3 = {
"div" : "#event-vid3",
"modal": "#myModal3",
"videoId": "DtocUZ0vO3A"
};
ytVids = [yt1, yt2, yt3];
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/player_api?modestbranding=1&showinfo=0";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
// YouTube API for generating iframes
function onYouTubePlayerAPIReady() {
player = new YT.Player('ytplayer1', {
height: '360',
width: '640',
videoId: 'WdeFxB_ZibU',
playerVars: {'modestbranding': 1}
});
player = new YT.Player('ytplayer2', {
height: '360',
width: '640',
videoId: 'bx8wnsLRC1g',
playerVars: {'modestbranding': 1}
});
player = new YT.Player('ytplayer3', {
height: '360',
width: '640',
videoId: 'DtocUZ0vO3A',
playerVars: {'modestbranding': 1}
});
}
function playModal(divId, modId){
// Makes the entire div clickable
jQuery(divId).click(function() {
jQuery(modId).modal('toggle');
});
// Makes YouTube video stop playing when the modal is hidden
jQuery(modId).on('hidden.bs.modal', function (e) {
jQuery(modId + " iframe").attr("src", jQuery( modId + " iframe").attr("src"));
});
}
ytVids.forEach(function(vid){
playModal(vid.div, vid.modal);
});
// for screens below 700px width replace modal with link.
if( jQuery(document).width() < 700 ){
jQuery('.modal.fade').remove();
ytVids.forEach(function(vid){
var html = '<a class="gradient-css" style="padding: 10px 15px;"';
html += 'href="https://www.youtube.com/watch?v=' + vid.videoId + '">';
html += '<i data-feather="play-circle"></i> Play</a>';
jQuery(vid.div).html(html);
// make the entire link clickable for link
jQuery(vid.div).click(function(){
window.location = jQuery(this).find("a").attr("href");
return false;
});
});
feather.replace();
}
Also see: Tab Triggers