octocatstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation

     

Save Automatically?

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

Want a Run Button?

If active, the preview will update automatically when you change code.

HTML

            
              <h2>Expanding CSS3/jQuery Panel</h2>
<p class="about">A combination of very basic HTML, CSS and a little ( just a tiny ) bit of jQuery you can achieve a pretty nifty, clean expanding tile. Feel free to use this code, or the concept to create your own Expanding CSS3/jQuery Panels. </p>

  <ul class="wrapper">
    
    <li>
    <div class="info-box-green">
      <h4 class="entypo-tools"> Featured Services</h4>
  
      <div class="info-content">
        <div class="text">
          <p>Brewpub conditioning tank cask conditioned ale original gravity. ipa specific gravity grainy; amber berliner weisse. squares keg; lauter. krausen wheat beer glass barley? barleywine cask conditioning, hard cider hydrometer.</p>
        </div>
        <span class="entypo-plus" id="expand-green"></span>
      </div>
    </div>
  </li>
  
  <li>
    <div class="info-box-red">
      <h4 class="entypo-lifebuoy"> Support Services</h4>
  
      <div class="info-content">
        <div class="text">
          <p>Brewpub conditioning tank cask conditioned ale original gravity. ipa specific gravity grainy; amber berliner weisse. squares keg; lauter. krausen wheat beer glass barley? barleywine cask conditioning, hard cider hydrometer.</p>
        </div>
        <span class="entypo-plus" id="expand-red"></span>
      </div>
    </div>
  </li>
    
    <li>
    <div class="info-box-sky">
      <h4 class="entypo-lifebuoy"> Support Services</h4>
  
      <div class="info-content">
        <div class="text">
          <p>Brewpub conditioning tank cask conditioned ale original gravity. ipa specific gravity grainy; amber berliner weisse. squares keg; lauter. krausen wheat beer glass barley? barleywine cask conditioning, hard cider hydrometer.
          <br><br>
            Brewpub conditioning tank cask conditioned ale original gravity. ipa specific gravity grainy; amber berliner weisse. squares keg; lauter. krausen wheat beer glass barley? barleywine cask conditioning, hard cider hydrometer.
            <br><br>
            Brewpub conditioning tank cask conditioned ale original gravity. ipa specific gravity grainy; amber berliner weisse. squares keg; lauter. krausen wheat beer glass barley? barleywine cask conditioning, hard cider hydrometer.
          </p>
          
        </div>
        <span class="entypo-plus" id="expand-sky"></span>
      </div>
    </div>
  </li>
</ul>

            
          
!

CSS

            
              /* Google Font */
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700);

/* Font Icons from WeLoveIconFonts */
@import url(http://weloveiconfonts.com/api/?family=entypo);

/* entypo */
[class*="entypo-"]:before {
  font-family: 'entypo', sans-serif;
}

.entypo-mail {
  margin-right: 10px;
}

/* ClearFix Hack */

.cf:before,
.cf:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.cf:after { clear: both; }

/* For IE 6/7 only */
.cf { *zoom: 1; }


/* --------------------------
Customized CSS
---------------------------*/

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-size: 16px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  background-color: #162E33;
}

.wrapper {
  width: 820px;
  margin: 0 auto;
  padding: 0;
}

.wrapper > li {
  display: inline;
  margin: 0;
}

h2 {
  padding: 45px;
  font-family: inherit;
  font-size: 2.5em;
  font-weight: 600;
  color: #00AB83;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0px 3px 0px #;
        filter: dropshadow(color=#266B68, offx=0, offy=1);
}

.about {
  margin: 0 auto;
  padding: 0;
  line-height: 1.5em;
  font-size: 1.1em;
  width: 640px;
  color: #FFF;
  text-align: center;
}

/* Box Styling */

.info-box-green, .info-box-red, .info-box-sky {
  margin: 50px auto;
  padding: 0;
  width: 480px;
 	-webkit-box-shadow: 0 8px 6px -6px black;
	   -moz-box-shadow: 0 8px 6px -6px black;
	        box-shadow: 0 8px 6px -6px black;
}

.info-box-red h4 {
  -webkit-border-radius: 10px;
  border-radius: 10px;
  margin-bottom: -10px;
}

.info-box-red > .info-content > .text {
 -webkit-border-radius: 0 0 10px 10px;
  border-radius: 0 0 10px 10px; 
}

.info-box-green h4, .info-box-green > .info-content > .text {
 background-color: #00AB83;
}

.info-box-red h4, .info-box-red > .info-content > .text {
  background-color: #FF434C;
}

.info-box-sky h4, .info-box-sky > .info-content > .text {
  background-color: #00A5C3;
}

.info-box-green h4, .info-box-red h4, .info-box-sky h4 {
  padding: 25px;
  font-size: 1.125em;
  font-weight: 400;
  color: #FFF;
}

.info-box-green > .info-content > .text, .info-box-red > .info-content > .text, .info-box-sky > .info-content > .text {
  padding: 0px;
  font-size: 1em;
  line-height: 1.5em;
  height: 0;
  color: #FFF;
  overflow: hidden;
  -webkit-transition:  height 200ms ease;  
     -moz-transition:  height 200ms ease;  
       -o-transition:  height 200ms ease;  
          transition:  height 200ms ease;
}

.info-box-green > .info-content > .text > p, .info-box-red > .info-content > .text > p, .info-box-sky > .info-content > .text > p {
  padding: 20px 20px 60px;
}

.info-box-sky > .info-content > .text {
  background-color: #FFF;
  color: #444;
  border-radius: 0;
}
 
.info-box-green > .info-content > .text.open-green, .info-box-red > .info-content > .text.open-red, .info-box-sky > .info-content > .text.open-sky {
  display: block;
  height: auto;
}

.info-box-green > .info-content > span.close-green, .info-box-red > .info-content > span.close-red, .info-box-sky > .info-content > span.close-sky {
  -webkit-transform:rotate(135deg);
     -moz-transform:rotate(135deg);
       -o-transform:rotate(135deg);
      -ms-transform:rotate(135deg);
}

.info-box-green span, .info-box-red span, .info-box-sky span {
  display: inline-block;
  float: right;
  position: relative;
  bottom: 60px;
  right: 10px;
  margin: 0;
  padding: 10px;
  color: #FFF;
  font-size: 2em;
  cursor: pointer;
  /*  Rotate '+' to 'X' */
  -webkit-transition: all 600ms ease-in-out; 
     -moz-transition: all 600ms ease-in-out; 
       -o-transition: all 600ms ease-in-out; 
      -ms-transition: all 600ms ease-in-out; 
          transition: all 600ms ease-in-out;
}

.info-box-sky > .info-content > span.close-sky {
  color: #444;
}

.info-box-red span {
  position: relative;
  bottom: 50px;
  right: 10px;
}


            
          
!

JS

            
              // Green Button Js
$('#expand-green').on('click', function() {
  $(this).toggleClass('close-green');
  $('.text').toggleClass('open-green')
  .end();
});

// Red Button JS
$('#expand-red').on('click', function() {
  $(this).toggleClass('close-red');
  $('.text').toggleClass('open-red')
});

// Blue Button JS
$('#expand-sky').on('click', function() {
  $(this).toggleClass('close-sky');
  $('.text').toggleClass('open-sky');
});
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console