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 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.

HTML

              
                  <ul class="menu">
    <li class="itembox drop-down">
      <a class="item" href="#">展覽介紹</a>
      <div class="submenu">
        <a class="submenu-item">展覽地點</a>
        <a class="submenu-item">展後報告</a>
        <a class="submenu-item">主辦及協辦單位</a>
        <a class="submenu-item">媒體支援</a>
      </div>
    </li>
    <li class="itembox drop-down">
      <a  class="item" href="#">參展廠商</a>
      <div class="submenu">
        <a class="submenu-item">線上報名</a>
        <a class="submenu-item">各國代理</a>
        <a class="submenu-item">參展手冊</a>
        <a class="submenu-item">官方媒體</a>
        <a class="submenu-item">廠商名單</a>
        <a class="submenu-item">文宣品下載</a>
      </div>
    </li>    <li class="itembox drop-down">
      <a  class="item" href="#">參展廠商</a>
      <div class="submenu">
        <a class="submenu-item">線上報名</a>
        <a class="submenu-item">各國代理</a>
        <a class="submenu-item">參展手冊</a>
        <a class="submenu-item">官方媒體</a>
        <a class="submenu-item">廠商名單</a>
        <a class="submenu-item">文宣品下載</a>
      </div>
    </li>
    <li class="itembox drop-down">
      <a  class="item" href="#">參展廠商</a>
      <div class="submenu">
        <a class="submenu-item">線上報名</a>
        <a class="submenu-item">各國代理</a>
        <a class="submenu-item">參展手冊</a>
        <a class="submenu-item">官方媒體</a>
        <a class="submenu-item">廠商名單</a>
        <a class="submenu-item">文宣品下載</a>
      </div>
    </li>
    <li class="itembox drop-down">
      <a  class="item" href="#">參展廠商</a>
      <div class="submenu">
        <a class="submenu-item">線上報名</a>
        <a class="submenu-item">各國代理</a>
        <a class="submenu-item">參展手冊</a>
        <a class="submenu-item">官方媒體</a>
        <a class="submenu-item">廠商名單</a>
        <a class="submenu-item">文宣品下載</a>
      </div>
    </li>
  </ul>

              
            
!

CSS

              
                /* ===================================
   版型
   ===================================*/
*
  box-sizing border-box
ul
  padding 0
  a
    display inline-block
    text-decoration none
    color #666
 /* ===================================
   布局樣式
   ===================================*/
.menu
    max-width 300px
    margin 0 auto
    list-style-type none 
/* ===================================
   動態效果
   ===================================*/
.drop-down
  position relative
.submenu
  position relative
  opacity 0
  width 100%
  z-index 8
  transition opacity .5s ease
.submenu-item
  display block
  height 0px
  overflow hidden
  transition height .5s ease
.drop-down:hover
  .submenu
    opacity 1
  .submenu-item
    overflow visible
    height 30px
    
 /* ===================================
   視覺樣式
   ===================================*/
.item
  width 100%
  padding 10px
  border 1px solid #ddd
.item:hover
  background #ddd
.submenu-item
  background #333
  color #eee
  width 100%
  padding-left 20px
  line-height 30px
.submenu-item:hover
  background #555
.now
  .item
    background #ddd
  .submenu
    opacity 1
  .submenu-item
    background #555
    overflow visible
    height 30px

              
            
!

JS

              
                
              
            
!
999px

Console