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

              
                <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"/>
<ul class="acordeon">
  <li>
    <h4><span class="fa fa-facebook"></span></h4>
    <div class="contenido">
      <iframe src="https://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fcodepen.io/oloman/full/lqtFy&amp;layout=button_count&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=trebuchet+ms&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
    </div>
  </li>
  <li>
    <h4><span class="fa fa-twitter"></span></h4>
    <div class="contenido">
      <a class="twitter-share-button" data-count="horizontal" data-lang="es" href="https://twitter.com/share">Tweet</a>
      <script src="https://platform.twitter.com/widgets.js" type="text/javascript"></script>
    </div>
  </li>
  <li>
    <h4><span class="fa fa-google-plus"></span></h4>
    <div class="contenido">
      <g:plusone size="medium" href="https://codepen.io/oloman/pen/lqtFy"></g:>
      <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
    </div>
  </li>
  <li>
    <h4><span class="fa fa-pinterest"></span></h4>
    <div class="contenido">
       <a href="//es.pinterest.com/pin/create/button/" data-pin-do="buttonBookmark" ><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a>
      <script type="text/javascript" async src="//assets.pinterest.com/js/pinit.js"></script>
    </div>
  </li>
  <li>
    <h4><span class="fa fa-linkedin"></span></h4>
    <div class="contenido">
       <script src="//platform.linkedin.com/in.js" type="text/javascript">lang: es_ES1</script>
      <script type="IN/Share"></script>
    </div>
  </li>
</ul> 
              
            
!

CSS

              
                
/* Ajustes generales */
ul.acordeon * {
margin: 0 auto;
padding: 0;
vertical-align: middle;
color: #fff;
-webkit-transition: all .6s ease-in-out;
-moz-transition: all .6s ease-in-out;
transition: all .6s ease-in-out;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; 
}
/* Contenedor general */
ul.acordeon {
width: 100%; /* Personalizar ancho total desplegado */
overflow: hidden;
margin: 0 auto 10px !important;
padding: 0;
text-align: center;
list-style: none;
font-size: 0;
}
/* Cada elemento */
ul.acordeon li {
display: inline-block;
*display: inline; zoom: 1; /* IE7 */
width: 12%; /* 90 : (nºelem+2) */
height: 50px; /* Personalizar altura*/
padding: 0 !important;
background: #ccc;
text-align: center;
border-right: 1px solid #eee;
}
/* Títulos pestañas */
ul.acordeon li h4 {
display: inline-block;
*display: inline; zoom: 1; /* IE7 */
width: 100%;
height: 100%;
padding: 5px !important;
font-size: 30px;
text-align: center;
}
/* Contenido inicialmente oculto */
ul.acordeon li .contenido {
display: inline-block;
*display: inline; zoom: 1; /* IE7 */
width: 0%;
height: 100%;
padding: 15px 0;
overflow: hidden;
font-size: 14px;
background: #333;
}
/* Hover: Desplegamos elemento */
ul.acordeon li:hover {
width: 36%; /* aprox 3 x ancho ul.acordeon li */
}
/* Hover: Hacemos que el título no ocupe todo el ancho */
ul.acordeon li:hover h4 {
width: 40%; /* Parte sobre el total que ocupara icono desplegado */
background: #333;
}
ul.acordeon li:hover h4 span {
color: #eee;
}
/* Hover: La diferencia hasta el 100% lo ocupará el contenido */
ul.acordeon li:hover .contenido {
width: 60%; /* 100 - ancho ul.acordeon li:hover h4 */
}
/* Ajuste para pantallas pequeñas */
@media (max-width:600px) {
ul.acordeon {width: 98%;}
ul.acordeon li:hover {width: 50%;}
ul.acordeon li h4 {font-size: 18px;}
ul.acordeon li:hover h4 {width: 25%;}
ul.acordeon li:hover .contenido {width: 75%;}
}
              
            
!

JS

              
                
              
            
!
999px

Console