Pen Settings



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


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


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.


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.


                <!-- 添加icon图标库 -->
<link rel="stylesheet" href="">

<div class="icon-bar">
  <a class="active" href="#"><i class="fa fa-home"></i></a>
  <a href="#"><i class="fa fa-search"></i></a>
  <a href="#"><i class="fa fa-envelope"></i></a>
  <a href="#"><i class="fa fa-globe"></i></a>
  <a href="#"><i class="fa fa-trash"></i></a>


                .icon-bar {
    width: 90px; /* 设置特定宽度 */
    background-color: #555; /* 深灰色背景 */
.icon-bar a {
    display: block; /* 使链接显示在彼此下方,而不是并排显示 */
    text-align: center; /* 居中对齐文本 */
    padding: 16px; /* 添加一些填充 */
    transition: all 0.3s ease; /* 为悬停效果添加过渡 */
    color: white; /* 白色文本颜色 */
    font-size: 36px; /* 增加字体大小 */
.icon-bar a:hover {
    background-color: #000; /* 添加悬停颜色 */
.active {
    background-color: #04AA6D; /* 添加活动/当前颜色 */