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

              
                <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(https://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

Console