css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!--
Dans cet exemple on peut cliquer sur une des deux vignette carrée pour les agrandir. Une fois agrandie, on peut également faire défiler l'autre image. Il est ainsi possible de faire une galerie d'images que l'on peut agrandir et faire défiler.
-->



<div class="conteneur-flexbox">
  <div class="box">
		<p class="click">CLICK TO ZOOM</p>
		<!--le lien vers la grande image qui sera affichée lors du clic sur la vignette carrée -->
			<a href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/muller-full.jpg" data-lightbox="image-1" data-title="Josef Müller-Brockmann, né le 19 mai 1914 à Rapperswil et mort le 30 août 1996 à Zurich, est un graphiste et créateur de caractères suisse.">
				<!--le lien vers la petite image carrée qui sert de vignette -->
			<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/muller.jpg"></a>
	</div>
	
	<div class="box">
		<p class="click">CLICK TO ZOOM</p>
		<!--le lien vers la grande image qui sera affichée lors du clic sur la vignette carrée -->
			<a href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/Karl-Gerstner-full.jpg" data-lightbox="image-1" data-title="Karl Gerstner (2 July 1930 – 1 January 2017) was a Swiss designer, typographer, author and artist.">
				<!--le lien vers la petite image carrée qui sert de vignette -->
			<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/Karl-Gerstner.jpg"></a>
	</div>
	
</div>

            
          
!
            
              body {
	background-color: #F9E79F;
}

/*L'OPACITÉ DE LA VIGNETTE CHANGE LORS DU HOVER*/
img:hover {
	opacity: 0.8;
	transition: opacity 0.9s;
}


/*LE STYLE DU TEXTE CLICK TO ZOOM*/
.click {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: auto;
	text-align: center;
	z-index: 10;
	color: white;
	background-color: #0708a8;
	font-size: 1em;
	font-family: "Lucida Console", Courier, monospace;
	opacity: 0; /*opacity 0 car le texte ne doit pas être affiché avant le hover*/
}

.box:hover .click {
	opacity: 1; /*le texte passe à opacity 1 et devient visible*/
	transition: opacity 0.9s;
}


/*flexbox*/

.conteneur-flexbox {
  max-width: 650px;
  margin: 100px auto 0 auto;
  padding: 0px 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
}


.box {
	position: relative;
  width: 300px;
  height: 300px;
	border: 1px solid #838383;
}



/*LIGHTBOX*/

body:after {
    content: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/close.png) url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/loading.gif) url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/prev.png) url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/next.png);
    display: none;
}
body.lb-disable-scrolling {
    overflow: hidden;
}
.lightboxOverlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
    background-color: black;
    filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=80);
    opacity: 0.8;
    display: none;
}
.lightbox {
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 10000;
    text-align: center;
    line-height: 0;
    font-weight: normal;
}
.lightbox .lb-image {
    display: block;
    height: auto;
    max-width: inherit;
    max-height: none;
    border-radius: 3px;
    /* Image border */
    border: 4px solid white;
}
.lightbox a img {
    border: none;
}
.lb-outerContainer {
    position: relative;
    *zoom: 1;
    width: 250px;
    height: 250px;
    margin: 0 auto;
    border-radius: 4px;
    /* Background color behind image.
     This is visible during transitions. */
    background-color: white;
}
.lb-outerContainer:after {
    content: "";
    display: table;
    clear: both;
}
.lb-loader {
    position: absolute;
    top: 43%;
    left: 0;
    height: 25%;
    width: 100%;
    text-align: center;
    line-height: 0;
}
.lb-cancel {
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto;
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/loading.gif) no-repeat;
}
.lb-nav {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 10;
}
.lb-container > .nav {
    left: 0;
}
.lb-nav a {
    outline: none;
    background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
}
.lb-prev,
.lb-next {
    height: 100%;
    cursor: pointer;
    display: block;
}
.lb-nav a.lb-prev {
    width: 34%;
    left: 0;
    float: left;
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/prev.png) left 48% no-repeat;
    filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=0);
    opacity: 0;
    -webkit-transition: opacity 0.6s;
    -moz-transition: opacity 0.6s;
    -o-transition: opacity 0.6s;
    transition: opacity 0.6s;
}
.lb-nav a.lb-prev:hover {
    filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=100);
    opacity: 1;
}
.lb-nav a.lb-next {
    width: 64%;
    right: 0;
    float: right;
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/next.png) right 48% no-repeat;
    filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=0);
    opacity: 0;
    -webkit-transition: opacity 0.6s;
    -moz-transition: opacity 0.6s;
    -o-transition: opacity 0.6s;
    transition: opacity 0.6s;
}
.lb-nav a.lb-next:hover {
    filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=100);
    opacity: 1;
}
.lb-dataContainer {
    margin: 0 auto;
    padding-top: 5px;
    *zoom: 1;
    width: 100%;
    -moz-border-radius-bottomleft: 4px;
    -webkit-border-bottom-left-radius: 4px;
    border-bottom-left-radius: 4px;
    -moz-border-radius-bottomright: 4px;
    -webkit-border-bottom-right-radius: 4px;
    border-bottom-right-radius: 4px;
}
.lb-dataContainer:after {
    content: "";
    display: table;
    clear: both;
}
.lb-data {
    padding: 0 4px;
    color: white;
    font-family: "work_sans", sans-serif;
}
.lb-data .lb-details {
    width: 85%;
    float: left;
    text-align: left;
    line-height: 1.1em;
    font-family: "work_sans", sans-serif;
}
.lb-data .lb-caption {
    font-family: "work_sans", sans-serif;
    font-size: 13px;
    font-weight: bold;
    line-height: 1em;
}
.lb-data .lb-caption a {
    color: #4ae;
}
.lb-data .lb-number {
    display: block;
    clear: left;
    padding-bottom: 1em;
    font-size: 12px;
    color: #999999;
}
.lb-data .lb-close {
    display: block;
    float: right;
    width: 30px;
    height: 30px;
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/265602/close.png) top right no-repeat;
    text-align: right;
    outline: none;
    filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=70);
    opacity: 0.7;
    -webkit-transition: opacity 0.2s;
    -moz-transition: opacity 0.2s;
    -o-transition: opacity 0.2s;
    transition: opacity 0.2s;
}
.lb-data .lb-close:hover {
    cursor: pointer;
    filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=100);
    opacity: 1;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console