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

              
                 <div class="wrapper">
    <div class="notification success">
        <div class="notification-description">
            <p>
                <em class="fa fa-check fa-fw fa-2x"></em>
                <strong>绿色!</strong> 这是一个绿色提示框
            </p>
        </div>
    </div>
    <div class="notification error">
        <div class="notification-description">
            <p>
              <em class="fa fa-close fa-fw fa-2x"></em>
              <strong>错误!</strong> 
              这是一个红色的错误提醒框
            </p>
        </div>
    </div>
    <div class="notification warning">
        <div class="notification-description">
            <p>
                <em class="fa fa-warning fa-fw fa-2x"></em>
                <strong>警告!</strong>这是一个橙色的警告提醒框
            </p>
        </div>
    </div>
    <div class="notification info">
        <div class="notification-description">
            <p>
                <em class="fa fa-info fa-fw fa-2x"></em>
                <strong>信息!</strong>这是一个蓝色的信息提醒框!
            </p>
        </div>
    </div>
              
            
!

CSS

              
                .wrapper { 
  margin: 1em auto;
  width: 40%
}

.notification {
  position: relative;
  margin: 1em auto
}

.notification-description:after {
  content: '\f00d';
  font: 20px FontAwesome;
  position: absolute;
  color: #ecf0f1;
  top: 33%;
  right: 3%;
  cursor: pointer
}

	.notification .notification-description .fa {
	  color:#fff;
    margin-right: .5em
  }
  .notification .notification-description p {
    margin:0;
    vertical-align: middle;
    font: 300 16px/2.3 "Open Sans";
    color:#ecf0f1;
    padding: 10px 20px
  }

	.notification .notification-description p strong {
    font-size: 20px;
    margin-right: 20px;
    text-transform: uppercase;
    display: inline-block;
    width: 100px
  }
.notification.success .notification-description{
  position: relative;
  background: #27ae60;
  background: linear-gradient(
    25deg
    , rgba(39, 174, 96, .8) 0%
    , rgba(46, 204, 113, .8) 15%
    , rgba(39, 174, 96, 1) 15%
    , #27ae60 100% 
  )
}

.notification.error .notification-description{
   background: #c0392b;
    background: linear-gradient(
    25deg
    , rgba(192, 57, 43, .8) 0%
    , rgba(231, 76, 60, .8) 15%
    , rgba(231, 76, 60, 1) 15%
    , #c0392b 100% 
  )
}

.notification.warning .notification-description {
  background:#d35400;
  background: linear-gradient(
    25deg
    , rgba(211, 84, 0, .8) 0%
    , rgba(230, 126, 34, .8) 15%
    , rgba(230, 126, 34, 1) 15%
    , #d35400 100% 
  )
}
.notification.info .notification-description{
   background:#3498db;
  background: linear-gradient(
    25deg
    , rgba(41, 128, 185, .8) 0%
    , rgba(52, 152, 219, .8) 15%
    , rgba(52, 152, 219, 1) 15%
    , #3498db 100%
  )
}

@media (max-width: 90em) {
  .wrapper {
    width: 90%
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console