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

              
                <!-- Using
Bootstrap v4.0.0 - alpha 6
Color palette as per Google's material design - https://material.io/guidelines/style/color.html#color-themes
Box shadow and transition values as per Material Angular CSS md-whiteframe class.
Default - 4dp; On Hover - 24dp
-->

<div class="container">
  <div class="row">
    <div class="col-md">
      <div class="row justify-content-center">Box with hover effect</div>
      <div class="row justify-content-center"><div class="box shadow"></div></div>
    </div>
    <div class="col-md">
      <div class="row justify-content-center">Card with arrow and without hover effect</div>
      <div class="row justify-content-center">
        <div class="card shadow-nohover">
          <div class="card-header"><h5 class="card-title">Card Title</h5></div>
          <div class="card-block"><p class="card-text">Card Body</p></div>
        </div>
      </div>
    </div>
    <div class="col-md">
      <div class="row justify-content-center">Tag with hover effect</div>
      <div class="row justify-content-center">
        <p class="tag">Tag</p>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                $dark1: #000000;
$dark2: #212121;
$dark3: #303030;
$dark4: #424242;
body {
  background: $dark3;
  color: #F5F5F5;
}

.row {
  margin: 0.5rem;
}

.shadow {
  box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  &:hover {
    box-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12);
  }
}

.shadow-nohover {
  box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.box {
  background: $dark4;
  border-radius: 0.3rem;
  height: 10rem;
  width: 10rem;
}

.card {
  background: $dark4;
  border: 0px;
  border-radius: 0.3rem;
  width: 100%;
}

.card-header {
  background: $dark2;
  &::before {
    content: '';
    position: absolute;
    right: 100%;
    border: 1rem solid transparent;
    border-right: 1.25rem solid $dark2;
  }
}

.tag {
  position: relative;
  padding: 12px 25px;
  border: solid $dark2;
  border-width: 1px 1px 1px 0;
  border-radius: 0 12.5px 12.5px 0;
  background-image: linear-gradient($dark2, $dark3);
  box-shadow: 2px 2px 1px -1px rgba(0, 0, 0, 0.2), 2px 2px 1px -1px rgba(0, 0, 0, 0.14), 2px 2px 1px -1px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  &::before {
    content: "";
    position: absolute;
    border: 1px solid $dark2;
    border-radius: 15px 0 0 0;
    background-image: linear-gradient($dark2, $dark3);
    z-index: -1;
    top: 0;
    width: 50px;
    height: 50px;
    transform: translate(-51px, -1px) scale(0.70711, 0.70711) rotateZ(-45deg);
  }
  &::after {
    content: "";
    position: absolute;
    border: 1px solid $dark2;
    border-radius: 50%;
    background: $dark3;
    top: 18px;
    left: -3px;
    width: 13px;
    height: 13px;
  }
  &:hover {
    box-shadow: 16px 12px 6px rgba(0, 0, 0, 0.2), 12px 8px 12px rgba(0, 0, 0, 0.14), 4px 4px 4px rgba(0, 0, 0, 0.12);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console