Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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

              
                <div id="mobilemenu" class="ui styled accordion">
  <div class="title">
    <i class="paint brush icon"></i>
    Diseño web
    <i class="dropdown icon"></i>
  </div>
  <div class="content">
    <div class="accordion">
      <div class="title">
          <i class="cloud upload icon"></i>
          Level 1Asa
          <i class="dropdown icon"></i>
      </div>
      <div class="content">
        <div class="accordion">
          <div class="item">
              <i class="tags icon"></i>
              Level 1A-A
          </div>
          <div class="item">
              <i class="shield alternate icon"></i>
              Level 1A-A
          </div>
        </div>
      </div>
      <div class="item">
          <i class="headphones icon"></i>
          Level 1B
      </div>
      <div class="item">
          <i class="chart line icon"></i>
          Level 1C
      </div>
    </div>
  </div>
  <div class="item">
    <i class="code icon"></i>
    Desarrollo front-end
  </div>
  <div class="title">
    <i class="mobile alternate icon"></i>
    Diseño responsive
    <i class="dropdown icon"></i>
  </div>
  <div class="content">
    <div class="accordion">
      <div class="title">
        <i class="dropdown icon"></i>
        Level 2A
      </div>
      <div class="content">
        <div class="accordion">
          <div class="item">
              Level 2A-A
          </div>
          <div class="item">
              Level 2A-A
          </div>
        </div>
      </div>
      <div class="item">
          Level 2B
      </div>
      <div class="item">
          Level 2C
      </div>
    </div>
  </div>
  <div class="item">
    <i class="globe icon"></i>
    Posicionamiento web.
  </div>
</div>
              
            
!

CSS

              
                body {
  margin: 20px;
}
#mobilemenu .item {
  margin: 0;
  padding: .75em 1em;
  color: rgba(0,0,0,.4);
  font-weight: 700;
  border-top: 1px solid rgba(34,36,38,.15);
  -webkit-transition: background .1s ease,color .1s ease;
  transition: background .1s ease,color .1s ease;
  cursor: pointer;
}
#mobilemenu .title, #mobilemenu .item {
  color: #2E2C42;
  font-weight: 700;
  font-size: 14px;
}
#mobilemenu .active.title, #mobilemenu .item:active {
  color: #AD6898;
}
#mobilemenu .icon:not(.dropdown)  {
  margin-left: 2px;
  margin-right: 8px;
}
#mobilemenu .dropdown.icon {
  float: right;
}
#mobilemenu > .content {
  padding: 0px;
}
#mobilemenu > .content > .accordion{
  margin: 0px;
}
#mobilemenu > .content > .accordion > div{
  background: #454359;
  color: #FFFFFF;
  padding-left: 30px;
  border-top: 1px solid #58566e;
  font-weight: 500;
}
#mobilemenu .title .dropdown.icon {
  font-size: 18px;
  margin-top: 0px; 
}
#mobilemenu .title .dropdown.icon::before {
  content: '\f107';
  font-family: Icons;
}
#mobilemenu .active.title .dropdown.icon {
  -webkit-transform: rotate(-180deg);
  transform: rotate(-180deg);
  margin-top: 3px;
}

#mobilemenu > .content > .accordion > .content {
  padding: 0px;
}
#mobilemenu > .content > .accordion > .content > .accordion{
  margin: 0px;
}
#mobilemenu > .content > .accordion > .content > .accordion > .item{
  background: #312F45;
  color: #FFFFFF;
  padding-left: 50px;
  font-weight: 500;
  border-top: 1px solid #45425C;
}

              
            
!

JS

              
                $('#mobilemenu').accordion()

$('#mobilemenu .item').click(() => {
  
})

              
            
!
999px

Console