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.
<body>
<div class="wrapper">
<nav class="navbar navbar-default navbar-fixed-top navbar-aabb">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <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="#"><img src="https://sisteminterattivi.altervista.org/img/Logo-Accademia.png" width="498" height="303" alt="Logo Accademia"/></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li ><a href="index.html">Home<span class="sr-only">(current)</span></a></li>
<li><a href="https://sisteminterattivi.altervista.org/sitoboot/gallery.html">Gallery</a></li>
<li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Portfolio <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://sisteminterattivi.altervista.org/sitoboot/Portfolio-1.html">Portfolio a tre colonne</a></li>
<li><a href="#">Another action</a></li>
</ul>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- InstanceBeginEditable name="MainContent" -->
<div class="container">
<div class="page-header">
<h1>Il mio portfolio <small>versione a tre colonne </small></h1>
<p>Porfolio a tre colonne che collassa in una solo colonna su smartphone e tablet.</p>
</div>
<section class="portfolio-3-cols">
<div class="row">
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/1280px-walker_evans_new_orleans_street_corner.jpg" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/1280px-walker_evans_new_orleans_street_corner.jpg" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 1</h4>
<p>Un angolo di New Orleans</p>
</figcaption>
</figure>
</a>
</div>
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/Abelardo Morell - Right Side Up, Camera Obscura Image of San Marco in Office, 2007.jpeg" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/Abelardo Morell - Right Side Up, Camera Obscura Image of San Marco in Office, 2007.jpeg" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 2</h4>
<p>Immagine di S.Marco in camera oscura</p>
</figcaption>
</figure>
</a>
</div>
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/Ansel Adams - Mt. Williamson Clearing Storm, 1944.jpg" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/Ansel Adams - Mt. Williamson Clearing Storm, 1944.jpg" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 3</h4>
<p>Mt. Williamson Clearing Storm, 1944</p>
</figcaption>
</figure>
</a>
</div>
</div>
<div class="row">
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/daido-05.jpg" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/daido-05.jpg" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 4</h4>
<p>Notte</p>
</figcaption>
</figure>
</a>
</div>
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/julius-shulman-view-of-ministry-of-justice-and-government-building-from-senate-building-brasc3adlia-brazil-1977.jpg" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/julius-shulman-view-of-ministry-of-justice-and-government-building-from-senate-building-brasc3adlia-brazil-1977.jpg" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 5</h4>
<p>View of ministry of justice and government building</p>
</figcaption>
</figure>
</a>
</div>
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/kissing-in-paris-kiss-first-photography-photos-262182.jpg" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/kissing-in-paris-kiss-first-photography-photos-262182.jpg" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 6</h4>
<p>Kissing in Paris</p>
</figcaption>
</figure>
</a>
</div>
</div>
<div class="row">
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/len-tabner.png" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/len-tabner.png" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 7</h4>
<p>Len Tabner</p>
</figcaption>
</figure>
</a>
</div>
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/tumblr_lwern5yaoB1qd0ln0o1_1280.jpg" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/tumblr_lwern5yaoB1qd0ln0o1_1280.jpg" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 8</h4>
<p>Natura viva</p>
</figcaption>
</figure>
</a>
</div>
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/tumblr_mwhajjAtnB1rf1jvro1_1280.jpg" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/tumblr_mwhajjAtnB1rf1jvro1_1280.jpg" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 9</h4>
<p>Ritratto</p>
</figcaption>
</figure>
</a>
</div>
</div>
<div class="row">
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/tumblr_mwtx9lmQew1rf1jvro1_1280.jpg" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/tumblr_mwtx9lmQew1rf1jvro1_1280.jpg" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 10</h4>
<p>Jean Paul Belmondo e Alain Delon</p>
</figcaption>
</figure>
</a>
</div>
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/William Gottlieb - Ella Fitzgerald, Duke Ellington and Benny Goodman.jpg" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/William Gottlieb - Ella Fitzgerald, Duke Ellington and Benny Goodman.jpg" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 11</h4>
<p>Ella Fitzgerald, Duke Ellington e Benny Goodman</p>
</figcaption>
</figure>
</a>
</div>
<div class="col-md-4">
<a href="https://sisteminterattivi.altervista.org/sitoboot/img/website-144.jpg" title="Ingrandisci l'immagine">
<figure>
<img src="https://sisteminterattivi.altervista.org/sitoboot/img/website-144.jpg" class="img-responsive" alt=""/>
<figcaption>
<h4>Immagine 12</h4>
<p>Ritratto</p>
</figcaption>
</figure>
</a>
</div>
</div>
</section>
</div>
<!-- InstanceEndEditable -->
<footer class="navbar navbar-inverse navbar-fixed-bottom text-center">Sistemi Interattivi I - ©NTA 2016</footer>
</div>
<script src="../js/jquery-1.12.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/custom.js"></script>
</body>
/* CSS Document */
.navbar-aabb {
background-image:none;
box-shadow: none;
background-color: #fffbfb;
border-radius:0;
}
.navbar-aabb .navbar-brand > img {
max-height: 100%;
width: auto;
}
.navbar-aabb .navbar-brand {
height: 74px;
padding-top: 5px;
padding-bottom: 5px;
}
.navbar-aabb .navbar-nav > li > a {
font-size: 24px;
line-height: 24px;
padding-top: 25px;
padding-bottom: 25px;
}
.navbar-aabb .navbar-nav > li > a:hover {
color: #ba4232;
}
.navbar-aabb .navbar-nav >li.active > a,
.navbar-aabb .navbar-nav >li.open > a,
.navbar-aabb .navbar-nav >li.active > a:hover,
.navbar-aabb .navbar-nav >li.open > a:focus,
.navbar-aabb .dropdown-menu >li > a:hover,
.navbar-aabb .dropdown-menu >li > a:focus {
background-image: none;
color: #fff;
background-color: #ba4232;
}
.wrapper {
padding-top: 74px;
padding-bottom: 50px;
}
.jumbotron {
background-image: url(http://img2.juzaphoto.com/001/shared_files/uploads/253452.jpg);
color: #fff;
background-size:cover;
}
footer.navbar-inverse {
background-image:none;
color: #fff;
}
figcaption h4, figcaption p {
margin: 0;
line-height: 1.1;
}
.portfolio-3-cols a figure {
position: relative;
overflow:hidden;
margin-bottom: 30px;
}
.portfolio-3-cols a figure img {
transition: all .8s;
transform: scale(2,2);
opacity: .3;
}
.portfolio-3-cols a figure figcaption {
position: absolute;
bottom: 0;
right: 0;
left: 0;
top: auto;
transform: translateY(0);
transition: all 0.8s;
opacity: 1;
color: #000;
text-shadow: #fff 0px 0px 4px;
padding: 15px;
background-color: rgba(255,255,255,0.50);
}
.portfolio-3-cols a figure figcaption h4 {
font-weight:600;
}
.portfolio-3-cols a:hover figure img, .portfolio-3-cols a:hover figure img {
transition: all .8s;
transform: scale(1,1);
opacity:1;
}
.portfolio-3-cols a:hover figure figcaption, .portfolio-3-cols a:hover figure figcaption {
transform: translateY(100%);
transition: all 0.8s;
opacity: 0;
}
$(document).ready(function(e) {
var currentUrl = window.location.href;
$('.navbar-nav a').each(function(index, element) {
var $el = $(element);
var url = window.location.href;
var href = $el.attr('href');
if (url.indexOf(href) > -1) {
$el.parent().addClass('active');
}
});
$('.portfolio-3-cols a').magnificPopup({
type: 'image',
zoom: {
enabled:true,
opener: function (openerElement) {
return openerElement.find('figure');
}
},
image: {
titleSrc: function(item) {
return item.el.find('figure p').html();
}
}
});
});
Also see: Tab Triggers