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

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

              
                <html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body>
  <h2>下拉式選單(滑鼠游標滑過版)</h2>
  <p>試試把滑鼠游標移動到以下按鈕,你將會看到幾個<b>超棒</b>der超連結</p>

<div class="dropdown">
  <button class="dropdown-button">這是按鈕,游標過來吧!</button>
  <div class="dropdown-list">
 <a href="https://www.facebook.com/groups/936052100195289/">小白社群</a>
    <a href="https://blog.happycoding.today/category/codingwithnewbie/">小白部落格</a>
    <a href="https://open.firstory.me/user/superjunior">小白Podcast頻道</a>
  </div>
</div>




</body>
</html>

              
            
!

CSS

              
                
.dropdown-button {
  background-color: #e691ae;
  color: white;
  padding: 16px;
  font-size: 16px;
  border: none;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-list {
  display: none;
  position: relative;
  background-color: #f5c6d6;
  box-shadow: 0px 16px 8px 0px rgba(0,0,0,0.4);
  z-index: 1;
}

.dropdown-list a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  min-width: 175px;
  display: block;
}

.dropdown-list a:hover {background-color: #c77f98;}

.dropdown:hover .dropdown-list {display: block;}

.dropdown:hover .dropdown-button {background-color: #ed6191;}

              
            
!

JS

              
                
              
            
!
999px

Console