<div class="slides">
  <div class="slide">
    <input type="radio" name="slideshow" id="slide1"><label for="slide1">Slide 1</label>
    <div class="content">
      <h2>Slide 1 Title</h2>
      <p>Maecenas faucibus mollis interdum. Sed posuere consectetur est at lobortis. Nulla vitae elit libero, a pharetra augue. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
      </div>
    
  </div>
  <div class="slide">
    <input type="radio" name="slideshow" id="slide2"><label for="slide2">2</label>
    <div class="content">
      <h2>Slide 2 Title</h2>
      <p>Vestibulum id ligula porta felis euismod semper. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.</p>
      </div>
    
  </div>
  <div class="slide">
    <input type="radio" name="slideshow" id="slide3"><label for="slide3">3</label>
    <div class="content">
      <h2>Slide 3 Title</h2>
      <p>Maecenas sed diam eget risus varius blandit sit amet non magna. Donec ullamcorper nulla non metus auctor fringilla. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean lacinia bibendum nulla sed consectetur. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
    </div>
    
  </div>
  <div class="slide">
    <input type="radio" name="slideshow" id="slide4"><label for="slide4">4</label>
    <div class="content">
      <h2>Slide 4 Title</h2>
      <p>Donec ullamcorper nulla non metus auctor fringilla. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean lacinia bibendum nulla sed consectetur.</p>
    </div>
    
  </div>
</div>
* {
    box-sizing: border-box;
	}

.preload * {
  transition: none !important;
}

	body {
		padding: 30px; 
		font-family: "Helvetica Neue", Helvetica, arial, sans-serif; 
    background: url('http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/wild_oliva.png') #333;
    line-height: 1.5;
	}

  h2 {
    color: #fff;
    margin-bottom: .5em;
    font-size: 1.7em;
    font-weight: bold;
    text-shadow: 0 1px 0 rgba(0,0,0,1);
  }

  .slides {
    position: relative;
    width: 300px;
    height: 300px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,.5);
    border-radius: 5px;
    background: #333;
    border: 1px solid rgba(255,255,255,.1);
  }

  .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;  
    
  }

  .content {
    position: absolute;
    width: 100%;
    transform: translateX(-100%);
    top: 0;
    opacity: 0;
    padding: 20px;
    transition: transform .5s ease-out, opacity .5s ease-out;
  }

  .content p {
    font-size: .85em;
    color: #fff;
  }

  input[type=radio] {
    display: none;
  }

  label {
    display: block;
    position: absolute;
    bottom: 0;
    line-height: 3em;
    width: 25%;
    text-align: center;
    cursor: pointer;
    font-size: .8em;
    z-index: 50;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,.25);
    font-weight: bold;
    border-top: 2px solid #fff;

background: rgb(135,224,253); /* Old browsers */
background: -moz-linear-gradient(top,  rgba(135,224,253,1) 0%, rgba(83,203,241,1) 40%, rgba(5,171,224,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(135,224,253,1)), color-stop(40%,rgba(83,203,241,1)), color-stop(100%,rgba(5,171,224,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  rgba(135,224,253,1) 0%,rgba(83,203,241,1) 40%,rgba(5,171,224,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  rgba(135,224,253,1) 0%,rgba(83,203,241,1) 40%,rgba(5,171,224,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  rgba(135,224,253,1) 0%,rgba(83,203,241,1) 40%,rgba(5,171,224,1) 100%); /* IE10+ */
background: linear-gradient(to bottom,  rgba(135,224,253,1) 0%,rgba(83,203,241,1) 40%,rgba(5,171,224,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#87e0fd', endColorstr='#05abe0',GradientType=0 ); /* IE6-9 */

  }


  .slide:nth-child(2) label {
    margin-left: 25%;
  }

  .slide:nth-child(3) label {
    margin-left: 50%;
  }

  .slide:nth-child(4) label {
    margin-left: 75%;
  }

  input[type=radio]:checked ~ .content {
transform: translateX(0);
    opacity: 1;
  }

  input[type=radio]:checked + label {
    background: #333;
    color: #ccc;
    text-shadow: none;
  }
/* js is only used to avoid transition on page load. Thanks to Chris Coyier for the tip. 

https://css-tricks.com/transitions-only-after-page-load/

*/

jQuery(function($){
  $('html').removeClass('preload');
})
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js