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

              
                <body class="h-100">
  <div class="h-100 container">
    <div class="card mobile-card">
      <section class="mobile-status-bar">
        <span class="mobile-status-time">
          9:41
        </span>
        <div class="mobile-status-icons">
          <i class="material-icons mobile-status-icon mobile-icon-network">
network_cell
</i>
          <i class="material-icons mobile-status-icon mobile-icon-wifi">
wifi_tethering
</i>
          <i class="material-icons mobile-status-icon mobile-icon-battery">
battery_std
</i>
        </div>
      </section>
      <section class="onboarding">
        <main class="onboarding-slides">
          <div class="onboarding-slide">
            <img class="onboarding-illustration" src="https://42f2671d685f51e10fc6-b9fcecea3e50b3b59bdc28dead054ebc.ssl.cf5.rackcdn.com/illustrations/music_r1se.svg" alt="" />
            <h2 class="onboarding-title">
              Listen to your heart
            </h2>
            <p class="onboarding-subtitle">
              Select from the vast collection of songs hand-picked for you.
            </p>
          </div>
        </main>
        <nav class="onboarding-action-bar">
          <button class="onboarding-button onboarding-button-prev" disabled>
            Prev
          </button>
          <div class="onboarding-slides-indicators">
            <span class="onboarding-slides-indicator onboarding-slides-indicator--active"></span>
            <span class="onboarding-slides-indicator"></span>
            <span class="onboarding-slides-indicator"></span>
          </div>
          <button class="onboarding-button onboarding-button-next">
            Next
          </button>
        </nav>
      </section>
    </div>
  </div>
</body>
              
            
!

CSS

              
                .h-100 {
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.container {
  background: #fafafa;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card {
  box-shadow: 2px 4px 30px 0px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.mobile-card {
  width: 280px;
  height: 500px;
  background-color: white;
  border-radius: 5px;
  font-family: "Roboto", sans-serif;
}

.mobile-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 8px 0;
  font-size: 12px;
}

.mobile-status-icons {
  display: flex;
  justify-content: flex-end;
}

.mobile-status-icon {
  font-size: 13px;
  padding: 0 2px;
}

.onboarding {
  flex: 1;
  text-align: center;
  padding: 50px 20px 15px;
  display: flex;
  flex-direction: column;
}

.onboarding-slides {
  flex: 1;
}

.onboarding-illustration {
  width: 100%;
  height: auto;
}

.onboarding-title {
  margin: 40px 0 25px;
  font-size: 20px;
}

.onboarding-subtitle {
      padding: 0 5px;
    font-size: 14px;
    color: #aaa;
    line-height: 22px;
}

.onboarding-action-bar {
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.onboarding-button {
  background-color: transparent;
  border: none;
  outline: 0;
}

.onboarding-button {
  padding: 10px 15px;
  border-radius: 3px;
  transition: all 0.3s ease-in;
}

.onboarding-button[disabled]{
  color: #aaa;
}

.onboarding-button-next {
  color: #6c63ff;
}

.onboarding-button-next:hover,
.onboarding-button-next:focus {
  color: #fff;
  background-color: #6c63ff;
}

.onboarding-slides-indicators {
  display: flex;
  align-items: center;
}

.onboarding-slides-indicator {
  border-radius: 20px;
  font-size: 0;
  padding: 6px;
  background-color: #6c63ff33;
  margin: 0 2px;
}

.onboarding-slides-indicator--active {
  background-color: #6c63ff7d;
}

              
            
!

JS

              
                
              
            
!
999px

Console