123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <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> 
            
          
!
            
              
/* 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%;}
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console