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.
<!-- NVE CSS w/reset of background (CSS-> load before html[this]) -->
<link href="https://www.nve.no/Content/Styles/all.css?rev=5" rel="stylesheet" type="text/css">
<style>
body{
background-color:#ffffff;
}
</style>
<!-- END -->
<section class="page-container">
<nav class="global-sidebar"></nav>
<section class="page">
<div class="row"> <!-- NVE content div -->
<ul id="timeline" class="timeline">
<div class="arrowhead"></div>
<li class=" ">
<div class="timeline-badge">2008 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">NVE får tildelt utvidet ansvar for statlige forvaltningsoppgaver innen forebygging av skredulykker</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">2007 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">EUs rammedirektiv for vann innført. NVE har spesielt ansvar for å tolke direktivets miljømål og – tiltak i vassdrag der det er gjort fysiske inngrep</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">2003 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Permanent museums- og kulturminneordning i NVE</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">2002 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Enova blir opprettet og overtar NVEs tidligere ansvar for tildeling av tilskudd til energiøkonomisering og energiomlegging</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">2001 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Ny lov om vassdrag og grunnvann - en moderne vannressurslov</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">1998 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Navneskifte til Norges vassdrags- og energidirektorat</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">1995 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Vesleofsen, stor flom på Østlandet</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">1991 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Fra forvaltning til forretning. Ny energilov, nye oppgaver og ny organisasjon</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">1989 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Fast flomvarslingstjeneste</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">1986 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Stor omorganisering av NVE der Statkraftverkene ble skilt ut som frittstående forvaltningsbedrift</h3>
</div>
<div class="timeline-body">
<p>Det førte til at antall ansatte i NVE gikk ned fra 4000 til 380. Navneskifte til Norges vassdrags- og energiverk.</p>
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">1986 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Samla plan for vassdrag</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">1972 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Første verneplan for vassdrag</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">1972 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Forurensningssaker skilt ut fra NVE og underlegges Miljøverndepartementet</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">1967 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">NVE begynte med flomvarslingstjenester</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">1966 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Naturvernkontoret i Vassdragsdirektoratet opprettet</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">1940 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Ny vassdragslov</h3>
</div>
<div class="timeline-body">
<p><img style="width: 105px; height: 105px;" src="https://www.nve.no/media/1820/signet-vassdragsdirektoeren-rdg.jpg?width=105&height=105" alt="Signet" data-id="13268"></p>
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">1938 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Statsstønad til elektrisitetsforsyning i strømløse distrikter</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">1929 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Elektrisitetstilsynet opprettes og plasseres under NVE</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">1921 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Norges vassdrags- og elektrisitetsvesen opprettet. Vassdrags- og energiforvaltningen samlet i en etat</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">1912 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">En ingeniør stasjoneres i Førde. Begynnelsen på regionkontorene</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">1909 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Konsesjonsloven innføres. Denne inneholdt bestemmelser om ”hjemfallsrett”</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">1907 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Kanalvesenet skifter navn til Vassdragsvesenet</h3>
</div>
<div class="timeline-body">
<p><img style="width: 105px; height: 105px;" src="https://www.nve.no/media/1820/signet-vassdragsdirektoeren-rdg.jpg?width=105&height=105" alt="Signet" data-id="13268"></p>
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">1891 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Norge får sin første elektrisitetslovgivning</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">1887 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Lov om vassdragenes benyttelse. En ny epoke for å sikre samfunnsmessig kontroll og medbestemmelsesrett over utnyttelsen av vassdragene</h3>
</div>
<div class="timeline-body">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut purus odio. Sed ac urna ut justo fermentum dignissim. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam eget lorem sit amet ipsum convallis feugiat eu sed orci. Nam blandit neque erat, vel blandit erat semper sed. Donec ornare metus ac mollis viverra. Ut tincidunt tellus ac felis tempor gravida. Aliquam erat volutpat. Cras eget lectus est. Integer nec venenatis dolor. Nullam eget leo libero.</p>
</div>
<div class="timeline-footer">
<a href="/om-nve/kulturminner/nves-historie/1887-lov-om-vassdragenes-benyttelse-en-ny-epoke-for-a-sikre-samfunnsmessig-kontroll-og-medbestemmelsesrett-over-utnyttelsen-av-vassdragene/">Les mer</a>
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">1885 </div>
<div class="timeline-panel">
<img data-pixel-width="640" src="https://www.nve.no/media/1116/tegning-nve-anleggsnummer-1897.jpg?center=0.51,0.49882903981264637&mode=crop&quality=80&width=640&format=jpg&slimmage=true&rnd=130991443200000000" data-slimmage="true" data-src="https://www.nve.no/media/1116/tegning-nve-anleggsnummer-1897.jpg?center=0.51,0.49882903981264637&mode=crop&quality=90&width=0&format=jpg&slimmage=true&rnd=130991443200000000" alt="Alttekst/bildetekst?" style="max-width: 100%;">
<div class="timeline-heading">
<h3 class="timeline-title">Laugstøl Brug i Skien landets første elektrisitetsverk blir offisielt satt i drift 1. oktober</h3>
</div>
<div class="timeline-body">
</div>
<div class="timeline-footer">
<a href="/om-nve/kulturminner/nves-historie/1885-laugstol-brug-i-skien-landets-forste-elektrisitetsverk-blir-offisielt-satt-i-drift-1-oktober/">Les mer</a>
</div>
</div>
</li>
<li class="timeline-inverted ">
<div class="timeline-badge">1847 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Kanaldirektørembetet opprettes</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
<li class=" ">
<div class="timeline-badge">1813 </div>
<div class="timeline-panel">
<div class="timeline-heading">
<h3 class="timeline-title">Canal-Directionen får kontor i Tønsberg og ansetter ”Canal- og havneinspektør for Det Søndenfjeldske Norge”</h3>
</div>
<div class="timeline-body">
<p>Mussum ipsum cacilds, vidis litro abertis. Consetis adipiscings elitis. Pra lá , depois divoltis porris, paradis. Paisis, filhis, espiritis santis. Mé faiz elementum girarzis, nisi eros vermeio, in elementis mé pra quem é amistosis quis leo. Manduma pindureta quium dia nois paga. Sapien in monti palavris qui num significa nadis i pareci latim. Interessantiss quisso pudia ce receita de bolis, mais bolis eu num gostis.</p>
</div>
</div>
</li>
<div style="clear: both"></div> <li class=" last">
<div class="timeline-badge">1804 </div>
<div class="timeline-panel">
<img data-pixel-width="640" src="https://www.nve.no/media/1819/s-20-nederst-vassdragene-hadde-fotoarkivet-nvim.jpg?center=0.56666666666666665,0.50707547169811318&mode=crop&quality=80&width=640&format=jpg&slimmage=true&rnd=130991438210000000" data-slimmage="true" data-src="https://www.nve.no/media/1819/s-20-nederst-vassdragene-hadde-fotoarkivet-nvim.jpg?center=0.56666666666666665,0.50707547169811318&mode=crop&quality=90&width=0&format=jpg&slimmage=true&rnd=130991438210000000" alt="" style="max-width: 100%;">
<div class="timeline-heading">
<h3 class="timeline-title">NVEs forløper: Canal-Direction for Danmark-Norge opprettes i København</h3>
</div>
<div class="timeline-body">
</div>
</div>
</li>
</ul>
</div> <!-- NVE content div -->
</section>
</section>
.timeline {
max-width: 800px;
list-style: none;
padding: 20px 0 20px;
position: relative;
}
.timeline:before {
top: 2px;
bottom: 15px;
position: absolute;
content: " ";
width: 3px;
background-color: #eeeeee;
left: 50%;
margin-left: -1.5px;
}
.arrowhead{
width: 0;
position: absolute;
top: 0;
left: 50%;
margin-left: -15px;
border-top: 0 solid transparent;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-bottom: 15px solid #eeeeee;
}
.timeline > li {
min-height: 250px;
width: 50%;
padding-left: 42px;
padding-right: 42px;
margin-bottom: 30px;
position: relative;
float: left;
clear: left;
}
/*Panel*/
.timeline > li > .timeline-panel {
width: 92%;
float: left;
border: 1px solid #d4d4d4;
/*border-radius: 2px;*/
/*padding: 20px;*/
position: relative;
-webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
}
.timeline > li > .timeline-panel:before {
position: absolute;
top: 26px;
right: -15px;
display: inline-block;
border-top: 15px solid transparent;
border-left: 15px solid #ccc;
border-right: 0 solid #ccc;
border-bottom: 15px solid transparent;
content: " ";
}
.timeline > li > .timeline-panel:after {
position: absolute;
top: 27px;
right: -14px;
display: inline-block;
border-top: 14px solid transparent;
border-left: 14px solid #fff;
border-right: 0 solid #fff;
border-bottom: 14px solid transparent;
content: " ";
}
.timeline-panel img {
width: 100%;
padding: 10px 10px 0 10px;
}
/*Inverted panel*/
.timeline > li.timeline-inverted > .timeline-panel {
float: right;
}
.timeline > li.timeline-inverted > .timeline-panel:before {
border-left-width: 0;
border-right-width: 15px;
left: -15px;
right: auto;
}
.timeline > li.timeline-inverted > .timeline-panel:after {
border-left-width: 0;
border-right-width: 14px;
left: -14px;
right: auto;
}
.timeline > li.timeline-inverted{
float: right;
clear: right;
margin-top: 0px;
margin-bottom: 30px;
}
.timeline > li:nth-child(3) {
margin-top: 100px;
}
/*Last panel*/
@media (min-width: 850px) {
.timeline .last{
margin-top: -40px;
}
.timeline .last .timeline-panel{
margin-top: 75px;
left: calc(50% + 60px);
}
.timeline .last .timeline-panel:before{
top: -15px;
right: calc(50% - 7px);
border-top: 0 solid transparent;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-bottom: 15px solid #ccc;
}
.timeline .last .timeline-panel:after{
top: -14px;
right: calc(50% - 6.5px);
border-top: 0 solid transparent;
border-left: 14px solid transparent;
border-right: 14px solid transparent;
border-bottom: 14px solid #fff;
}
}
/*Badge*/
.timeline > li > .timeline-badge {
width: 50px;
height: 50px;
line-height: 50px;
font-size: 1.2em;
text-align: center;
position: absolute;
top: 16px;
right: 5px;
z-index: 100;
border-top-right-radius: 50%;
border-top-left-radius: 50%;
border-bottom-right-radius: 50%;
border-bottom-left-radius: 50%;
cursor: default;
}
.timeline > li.timeline-inverted > .timeline-badge{
left: 5px;
}
.timeline > li > .timeline-badge:before{
position: absolute;
top: 58%;
right: -11px;
content: ' ';
display: block;
width: 12px;
height: 12px;
margin-top: -10px;
background: #fff;
border-radius: 10px;
border: 4px solid rgb(255,80,80);
z-index: 10;
}
.timeline > li.timeline-inverted > .timeline-badge:before{
left: -11px;
}
/*Content*/
.timeline-title {
margin-top: 0;
padding: 20px 20px 0px 20px;
color: inherit;
}
.timeline-body > p,
.timeline-body > ul {
padding:0 20px 20px 20px;
margin-bottom: 0;
}
.timeline-body > p + p {
margin-top: 5px;
}
.timeline-footer{
background-color:#f4f4f4;
padding: 10px;
text-align: center;
}
.timeline-footer > a{
padding:20px;
cursor: pointer;
text-decoration: none;
}
/*Placement small devices*/
@media (max-width: 850px) {
ul.timeline:before {
bottom: -15px;
}
ul.timeline:before, .arrowhead {
left: 10px;
}
ul.timeline > li {
min-height: 50px;
margin-bottom: 20px;
padding-right: 5px;
position: relative;
width:100%;
float: left;
clear: left;
}
ul.timeline > li > .timeline-panel {
width: calc(100% - 40px);
width: -moz-calc(100% - 40px);
width: -webkit-calc(100% - 40px);
}
ul.timeline > li > .timeline-panel {
float: right;
}
ul.timeline > li > .timeline-panel:before {
border-left-width: 0;
border-right-width: 15px;
left: -15px;
right: auto;
}
ul.timeline > li > .timeline-panel:after {
border-left-width: 0;
border-right-width: 14px;
left: -14px;
right: auto;
}
.timeline > li.timeline-inverted{
float: left;
clear: left;
margin-top: 0;
margin-bottom: 20px;
}
ul.timeline > li > .timeline-badge, ul.timeline > li.timeline-inverted > .timeline-badge{
left: 15.5px;
}
ul.timeline > li > .timeline-badge:before, ul.timeline > li.timeline-inverted > .timeline-badge:before{
left: -11.5px;
}
}
Also see: Tab Triggers