Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ 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

Auto Save

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

              
                <div class="container">
  <div class="row">    
     <div class="col-lg-4">
        <div class="card">
           <div class="card-image">
            <div class="wrap">
              <img class="img-fluid" src="https://i.imgur.com/d0mem8Q.jpg" alt="image 1">
           </div><!-- card image -->
           </div> 
           <div class="card-content bg-light text-dark">
           <span class="card-title">Some Title</span>         
           <button type="button" id="show" data-target="show1" class="show btn btn-custom float-right" aria-label="Left Align"><i class="fa fa-ellipsis-v"></i></button>
          </div><!-- card content -->
          <div class="card-reveal show1">
          <span class="card-title">Card Title</span> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
           <p>Here is some more information about this product that is only revealed once clicked on.</p>
        </div><!-- card reveal -->
      </div>
  </div>
 <div class="col-lg-4">
    <div class="card">
     <div class="card-image">
       <div class="wrap">
             <img class="img-fluid" src="https://i.imgur.com/nx2vP1s.jpg" alt="image 2">      
             </div><!-- card image -->
             </div> 
             <div class="card-content bg-light text-dark">
             <span class="card-title">Some Title</span>       
            <button type="button" id="show2" data-target="show2" class="show btn btn-custom float-right" aria-label="Left Align"><i class="fa fa-ellipsis-v"></i></button>
     </div><!-- card content -->
            
   <div class="card-reveal show2">
       <span class="card-title">Card Title</span> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
    <p>Here is some more information about this product that is only revealed once clicked on.</p>
      </div><!-- card reveal -->
    </div>
</div>
 <div class="col-lg-4">
     <div class="card">
       <div class="card-image">
         <div class="wrap">
           <img class="img-fluid" src="https://i.imgur.com/Y22wvx4.jpg" alt="image 3">
         </div><!-- card image -->
        </div> 
        <div class="card-content bg-light text-dark">
           <span class="card-title">Some Title</span>         
            <button type="button" id="show3" data-target="show3" class="show btn btn-custom float-right" aria-label="Left Align">
              <i class="fa fa-ellipsis-v"></i>
           </button>
        </div><!-- card content -->
 <div class="card-reveal show3">
    <span class="card-title">Card Title</span> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
    <p>Here is some more information about this product that is only revealed once clicked on.</p>
     </div><!-- card reveal -->
     </div>
 </div>
  </div>
</div>
              
            
!

CSS

              
                @import url(http://fonts.googleapis.com/css?family=Roboto:400,300);
@import url(//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css);

.card .card-image{
    overflow: hidden;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    -ms-transform-style: preserve-3d;
    -o-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.card .card-image img{
    -webkit-transition: all 0.4s ease-in-out;
    -moz-transition: all 0.4s ease-in-out;
    -ms-transition: all 0.4s ease-in-out;
    -o-transition: all 0.4s ease-in-out;
    transition: all 0.4s ease-in-out;
}

.card .card-image:hover img{
    -webkit-transform: scale(1.2) rotate(-7deg);
    -moz-transform: scale(1.2) rotate(-7deg);
    -ms-transform: scale(1.2) rotate(-7deg);
    -o-transform: scale(1.2) rotate(-7deg);
    transform: scale(1.2) rotate(-7deg);
}

.card{
    font-family: 'Roboto', sans-serif; 
    border:none;
    margin-top: 10px;
    position: relative;
    -webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
  -moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
  box-shadow: 4 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}

.card .card-content {
  padding: 10px;   
  background:#1A9AE1;
  color:white;
}

.card .card-content .card-title, .card-reveal .card-title{
    font-size: 24px;
    font-weight: 200;    
}

.card .card-reveal{    
    padding: 20px;
    position: absolute;
    background-color: #FFF;
    width: 100%;
    overflow-y: auto;
    left:0;
    bottom:0;
    height: 100%;
    z-index: 1;
    display: none;    
}

.card .card-reveal .card-title{
    color: rgba(0, 0, 0, 0.71);
    margin:10px; 
    font-size:2.2rem;
}

.card .card-reveal p{
    color: rgba(0, 0, 0, 0.71);
    margin:10px; 
    font-size:1.2rem;
}

.btn-custom{
    background-color: transparent;
    font-size:18px;
 
}
              
            
!

JS

              
                jQuery(document).ready(function($) { 
  
  $('.show').click(function(){ //same as on('click', function(){}); I just prefer this syntax
    var target = $(this).attr('data-target'); //this will be card1 if the first is clicked.
    $('.'+target).slideToggle('slow'); //add . for class selector and use target to find the right element
  });

  $('.close').click(function(){ //close button
    $(this).parent().slideToggle('slow'); //find the nearest parent and close it
  });

});

/*$('.show').on('click',function(){
  $(this).parent().next(".card-reveal").slideToggle('show');
});

$('.close').on('click',function(){
  $(this).parent().slideToggle('show');
});*/


/*jQuery(document).ready(function($) {
  $(function(){
   $('.card-content button.show').on('click', function(){
     $(this).parents('.card-content').siblings('.card-reveal').slideToggle('slow');
   });
   $('.card-reveal button.close').on('click', function(){
     $(this).parents('.card-reveal').slideToggle('slow');
   });
 });
});*/
              
            
!
999px

Console