cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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 xmlns="http://www.w3.org/1999/xhtml" lang="pt-br">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Toggle texto</title>
  
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,300,400,500,600,700|Playfair+Display:400,700" rel="stylesheet">

</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 

<script type="text/javascript"> 
  
  jQuery.fn.toggleText = function(a,b) {
  		return   this.html(this.html().replace(new RegExp("("+a+"|"+b+")"),
               function(x){return(x==a)?b:a;}));
  }

  $(document).ready(function(){
      $('.menu ul li a').add('.bars').click(function(){
        var hasClass = $(this).parents('li').hasClass('active');
        $('.menu ul li').removeClass('active');
        $('.menu ul li div').slideUp(300);
        if (!hasClass){
          $(this).parents('li').toggleClass('active')
          $(this).siblings('div').slideDown(300);
        }
      });
   
      $(document).click(function(e){
        if (e.target.closest('.menu') == null){
          $('.menu ul li div').slideUp(300);
          $('.menu ul li').removeClass('active')
        }  
      });  
  });
  

  
</script>
</head>
<body>

  <nav class="menu">
    <ul>

      <li><a href="#">Download 1</a>
        <span class="bars" id="bar-1"></span>
        <span class="bars" id="bar-2"></span>
        <div>
          <h3>Conteúdo</h3>
          <br>
          <p>Coloque aqui seu link para download </p>
        </div>
      </li>

      <li><a href="#">Download 2</a>
        <span class="bars" id="bar-1"></span>
        <span class="bars" id="bar-2"></span>
        <div>
          <h3>Conteúdo</h3>
          <br>
          <p>Coloque aqui seu link para download </p>
        </div>
      </li>

    </ul>
  </nav>

</body>
</html>
            
          
!
            
              *{
  margin: 0;
  padding: 0;
}

.menu{
  display: block;
  position: relative;
  width: 350px;
  margin: 10px auto;
  box-shadow: 0 0 8px rgba(0,0,0,0.6);
  
}

.menu ul{
  list-style: none;
  position: relative;
}

.menu ul li{
  display: block;
  background: #708090;
  position: relative;
}

.menu ul li:hover{
  background: #607080;
}

.menu ul li.active  #bar-1{
  transform: rotate(0Deg);
}

.menu ul li.active  #bar-2{
  transform: rotate(0Deg);
}

.menu ul li a{
  display: block;
  width: auto;
  text-decoration: none;
  font-family: 'Montserrat';
  font-size: 16px;
  color: #fff;
  padding: 8px 0 8px 30px;
  border-bottom: 2px solid #567;
  text-transform: uppercase;
  box-shadow: inset 0px 2px 3px rgba(255,255,255,0.2);
}

.bars{
  position: absolute;
  width: 15px;
  height: 4px;
  border-radius: 2px;
  background: #fff;
  top: 16px;
  left: 8px;
  transition: all 0.3s cubic-bezier(.27,1.8,1,1.15);
  cursor: pointer;
}

#bar-1{
  transform: rotate(90deg);
}

#bar-2{
  transform: rotate(180deg);
}

.menu ul li div{
  font-family: 'Montserrat';
  padding: 15px;
  background: #fff;
  display: none;
  box-shadow: inset 0px 2px 2px rgba(0,0,0,0.4);
}


            
          
!
999px
Loading ..................

Console