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. 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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <body>

 <header>
    <h1>Griglia immagini con antemprima in CSS3</h1>
  </header>
  
  <section id="grid"><span id="01"></span><article>
          <a href="#01"><img src="http://yourinspirationweb.com/example/griglia-immagini-anteprima/images/01.jpg" /></a>
          <div class="info">
            <div class="description">
              <h1>Immagine 1 - By Mads Berg</h1>
              <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In in massa ultrices diam lobortis convallis quis in risus. Phasellus a augue vitae sapien condimentum condimentum quis at eros. In nisl lacus, pharetra nec commodo quis, accumsan ac sapien.</p>
            </div>
           
            <a class="maggioriInfo" href="https://bit.ly/suYdXh">LINK AUTORE</a>
          </div>
         </article><span id="02"></span><article>
          <a href="#02"><img src="http://yourinspirationweb.com/example/griglia-immagini-anteprima/images/02.jpg" /></a>
          <div class="info">
            <div class="description">
              <h1>Immagine 2 - by Lisk Feng</h1>

              <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In in massa ultrices diam lobortis convallis quis in risus. Phasellus a augue vitae sapien condimentum condimentum quis at eros. In nisl lacus, pharetra nec commodo quis, accumsan ac sapien.</p>
            </div>
           
            <a class="maggioriInfo" href="https://bit.ly/1tU2FaI">LINK AUTORE</a>
          </div>
         </article><span id="03"></span><article>
          <a href="#03"><img src="http://yourinspirationweb.com/example/griglia-immagini-anteprima/images/03.jpg" /></a>
          <div class="info">
            <div class="description">
              <h1>Immagine 3 - by Henrietta Harris</h1>

              <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In in massa ultrices diam lobortis convallis quis in risus. Phasellus a augue vitae sapien condimentum condimentum quis at eros. In nisl lacus, pharetra nec commodo quis, accumsan ac sapien.</p>
            </div>
           
            <a class="maggioriInfo" href="https://bit.ly/1ntwKNz">LINK AUTORE</a>
          </div>
      </article><span id="04"></span><article>
          <a href="#04"><img src="http://yourinspirationweb.com/example/griglia-immagini-anteprima/images/04.jpg" /></a>
          <div class="info">
            <div class="description">
              <h1>Immagine 4</h1>

              <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In in massa ultrices diam lobortis convallis quis in risus. Phasellus a augue vitae sapien condimentum condimentum quis at eros. In nisl lacus, pharetra nec commodo quis, accumsan ac sapien.</p>
            </div>
           
            <a class="maggioriInfo" href="https://bit.ly/1ntwKNz">LINK AUTORE</a>
          </div>
      </article>
   
     </section>
			
	</body>
</html>
              
            
!

CSS

              
                /* https://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

*, *:after, *:before { 

	-webkit-box-sizing: border-box; 
	-moz-box-sizing: border-box; 
	box-sizing: border-box; 
}
body, html { 
	font-size: 100%; 
	padding: 0; margin: 0;
}


body {
	font-family: Arial, sans-serif;
	color: #aaaeb2;
	background: #f1f1f1;
}

a {
	color: #888;
	text-decoration: none;
}
h1{
color:#F36	
}

/***********************************/

header {

	margin: 20px auto;
	text-align: center;
}
 
    section {
      max-width: 1000px;
      margin: 0 auto;
      overflow: hidden;
      position: relative;
    }

    section article {
      vertical-align: top;
      display: inline-block;
      width: 50%;
      margin-bottom: -5px;
    }

    section img {
      width: 100%;
      height: auto;
      padding: 0px;
	  border:2px solid #fff;
    }
	 section img:hover {
      opacity:0.8;
    }

    section .info {
      width: 180%;
      padding: 2em 0;
      margin: 0;
      position: relative;
      float: left;
      opacity: 1;
      height: 0;
      font-size: 0;
    }

    section .info h1 {
      margin-bottom: .5em;
	  color:#000;
    }
    section .info p {
      margin-bottom: 2em;
      line-height: 140%;
	  color:#999;
    }
    
    
    section .info .maggioriInfo {
      display: block;
	  margin-left:10px;
      margin-top: 0em;
      padding: .4em;
      background:#F36;
      color: white;
      text-decoration: none;
      text-transform: uppercase;
      text-align: center;
      font-size: 1em;
       -webkit-transition: 0.5s background-color;
       -moz-transition: 0.5s background-color;
       -ms-transition: 0.5s background-color;
       -o-transition: 0.5s background-color;
       transition: 0.5s background-color;
}
 
    section .info .maggioriInfo:hover {
      background-color: #000;
    }

/* Angelo Gulina: il trucco inizia da qui */ 
span {
      display: block;
      background: red;
      position: fixed;
      top:0;
      left:0;
      width: 10px;
      height: 10px;
    }

     article:nth-of-type(2n+1) .info {
      left: 0;
    }
    article:nth-of-type(2n+2) .info {
      left: -100%;
    }

    section span:target + article .info {
      height: auto;
      font-size: 100%;
      opacity: 1;
      -webkit-transition: .4s .4s opacity;
    }

    section span:target + article img {
      border-bottom:4px solid #F36; 
      -webkit-transition: .5s;
	  -moz-transition: .5s;
	  -o-transition: .5s;
    }


    section article:nth-of-type(3n+1) .info {
      left: 0;
    }
    section article:nth-of-type(3n+2) .info {
      left: -100%;
    }
    section article:nth-of-type(3n+3) .info {
      left: -200%;
    }


    section article .maggioriInfo {
      display: inline-block;
      float: left;
      clear: both;
      width: auto;
      margin-top: 2em 0 0 0;
    }
    section article .description {
      float: left;
      width: 100%;
	  padding-left:10px;
    }
   

     @media only screen and (min-width: 400px) {
      section article {
        width: 33.333333%;
      }
      section article .info {
        width: 280%;
      }
    }
              
            
!

JS

              
                
              
            
!
999px

Console