Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

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.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,100' rel='stylesheet' type='text/css'>
<input type="hidden" value="" id="diapo_en_cours" />
<input type="hidden" value="12" id="diapo_max" />


<div align="center" style="background-color:#ffffff; min-height:400px;">

<div class="bigdiap">
  <div style="padding-right:350px; position:relative; height:100%;">
    <div class="btn_close_popup"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/btn_close_popup.png"></div>
    <div style="width:800px;height:600px; padding-top:30px;"><div id="conteneur_grande_image" style="width:800px;height:600px; background-size:contain; background-repeat:no-repeat; background-position:center center; "></div></div>
    <div class="info_image">
      <div style="color:#999999; font-size:20px; padding:50px 0px;">IMAGE MACHIN FAUX LOGIT MERUM</div>
      <div style="color:#666666; font-size:12px;">Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte. Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique, sans que son contenu n'en soit modifié. Il a été popularisé dans les années 1960 grâce à la vente de feuilles Letraset contenant des passages du Lorem Ipsum, et, plus récemment, par son inclusion dans des applications de mise en page de texte, comme Aldus PageMaker.
     <br/><br/><span class="diapo_precedente">Précédente </span>  <span class="diapo_suivante"> Suivante</span>
     </div>
    </div>
  </div>
</div>

  <div style="width:1000px;" align="left">



<div class="mindiap" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image1.jpg);" idimage="1"><div class="mask">&nbsp;</div></div><div class="mindiap" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image2.jpg);" idimage="2"><div class="mask">&nbsp;</div></div><div class="mindiap" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image3.jpg);" idimage="3"><div class="mask">&nbsp;</div></div><div class="mindiap" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image4.jpg);" idimage="4"><div class="mask">&nbsp;</div></div><div class="mindiap" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image5.jpg);" idimage="5"><div class="mask">&nbsp;</div></div><div class="mindiap" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image6.jpg);" idimage="6"><div class="mask">&nbsp;</div></div><div class="mindiap" style="https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image7.jpg);" idimage="7"><div class="mask">&nbsp;</div></div><div class="mindiap" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image8.jpg);" idimage="8"><div class="mask">&nbsp;</div></div><div class="mindiap" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image9.jpg);" idimage="9"><div class="mask">&nbsp;</div></div><div class="mindiap" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image10.jpg);" idimage="10"><div class="mask">&nbsp;</div></div><div class="mindiap" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image11.jpg);" idimage="11"><div class="mask">&nbsp;</div></div><div class="mindiap" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/m_image12.jpg);" idimage="12"><div class="mask">&nbsp;</div></div>

<div align="center" style=" padding:5px; color:#999999; font-weight:300; font-size:30px; font-family:'Roboto';padding-top:20px;">AMAZING <font style="font-weight:400;">LIGHTBOX</font></div>
<a href="http://www.wifeo.com/code" style="text-decoration:none;" target="parent"><div align="center" style="  color:#999999; font-weight:300; font-size:20px; font-family:'Roboto';">www.wifeo.com/code</div></a>
  </div>
</div>
              
            
!

CSS

              
                .bigdiap
{
  display: none;
  z-index:998;
  background-color:rgba(231,231,231,0.8);
  width:100%; 
  height:100%; 
  position:fixed;
  font-family:'Roboto';
  top:0;
}
.mindiap
{
  width: 100px;
  height: 100px;
  position: relative;
  background-color: #666666;
  display: inline-block;
  vertical-align: top;
  background-size:cover;
  background-repeat: no-repeat;
  cursor: pointer;
}
.mindiap .mask
{
  background-color: rgba(0,0,0,0.7);
  width: 100px;
  position: absolute;
  height: 0px;
  bottom: 0px;
  -webkit-transition:all 0.2s linear;
  -moz-transition:all 0.2s linear;
  -ms-transition:all 0.2s linear;
  transition:all 0.2s linear;
}
.mindiap:hover .mask
{
  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/picto_view.png);
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(0,0,0,0.7);
  width: 100px;
  height: 100px;
}
.info_image
{
  position:absolute;
  width: 310px;
  z-index:1000;
  top: 0px; bottom: 0px;
  right: 0px;
  padding: 20px;
  text-align: left;
  background-color: #ffffff;
}
.btn_close_popup
{
  width: 30px;
  height:30px;
  background-color: #666666;
  position: absolute;
  top: 0px;
  right: 350px;
}
              
            
!

JS

              
                $(document).ready(function(){
  $(".mindiap").click(function()
    {    
		var idimage = $(this).attr("idimage");
   	   $(".bigdiap").fadeIn(600);   
	   $("#conteneur_grande_image").css("background-image", "url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/image"+idimage+".jpg)");
	   $("#diapo_en_cours").val(idimage);
  });
  
  $(".diapo_suivante").click(function()
    {  
		var diapo_en_cours = parseInt($("#diapo_en_cours").val());
		var diapo_max = parseInt($("#diapo_max").val());
		
		if((diapo_en_cours+1)>diapo_max)
		{
			$("#diapo_en_cours").val(1);
			 $("#conteneur_grande_image").css("background-image", "url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/image1.jpg)");
		}
		else
		{
			$("#diapo_en_cours").val(diapo_en_cours+1);
			$("#conteneur_grande_image").css("background-image", "url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/image"+(diapo_en_cours+1)+".jpg)");
		}
   	   
  });
  
    $(".diapo_precedente").click(function()
    {  
		var diapo_en_cours = parseInt($("#diapo_en_cours").val());
		var diapo_max = parseInt($("#diapo_max").val());
		
		if((diapo_en_cours-1)<1)
		{
			$("#diapo_en_cours").val(diapo_max);
			 $("#conteneur_grande_image").css("background-image", "url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/image"+diapo_max+".jpg)");
		}
		else
		{
			$("#diapo_en_cours").val(diapo_en_cours-1);
			$("#conteneur_grande_image").css("background-image", "url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/173024/image"+(diapo_en_cours-1)+".jpg)");
		}
   	   
  });
  
  
  $(".btn_close_popup").click(function()
    {  
      $(".bigdiap").fadeOut(600);
    });
});
              
            
!
999px

Console