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

              
                <!-- DC Ribbons Start -->
  <div style="position: relative; width:80%; height:130px; border:1px solid black; margin: 1em;">
    <div class="ribbon-wrap left-edge color"><span>Text</span></div>
    <br />
    <br />
    <div align="center">
      <big>Add images, text or anything<br />
        <small>This is a just a [DIV] layer.</small></big>
    </div>
  </div>
  <div style="position: relative; width:80%; height:130px; border:1px solid black; margin: 1em">
    <div class="ribbon-wrap right-edge color"><span>Text</span></div>
    <br />
    <br />
    <div align="center">
      <big>Add images, text or anything<br />
        <small>This is a just a [DIV] layer.</small></big>
    </div>
  </div>
<!-- DC Ribbons End -->
              
            
!

CSS

              
                //Color-Variables
letter-color = #FFFFFF
background-color=#FF6600
ribbon-shadow = #666666
border-color = #174C66

.ribbon-wrap
  color letter-color
  position absolute
  text-align center
  z-index 10
  
  &:before
  &:after 
    content: "";
    position: absolute;
    z-index: -2;
    
  & > span
    display: block;
    height: 100%;
    position: relative;

    &:before
    &:after
      content: "";
      position: absolute;
      z-index: -1;
  &.left-edge
    border-radius: 5px 5px 5px 0px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    height: 40px;
    left: -5px;
    line-height: 40px;
    top: 5px;
    width: 120px;   
    & > span
      border-radius: 5px 5px 5px 0px;
      &:before
        border-color: transparent;
        border-radius: 5px 5px 5px 5px;
        border-style: solid;
        border-width: 5px;
        bottom: -5px;
        left: 0;
        transform: rotate(-45deg);
  &.right-edge
    border-radius: 5px 5px 0 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    height: 30px;
    line-height: 30px;
    right: -5px;
    top: 5px;
    width: 120px;          
    & > span
      border-radius: 5px 5px 0 5px;          
      &:before
        border-color: transparent;
        border-radius: 5px 5px 5px 5px;
        border-style: solid;
        border-width: 5px;
        bottom: -5px;
        right: 0;
        transform: rotate(45deg);

  &.color
    & > span
      background-color: background-color;      

    &.left-edge
      & > span
        &:after
          border-color: background-color transparent background-color background-color

        &:before
          border-left-color: border-color;
          border-top-color: border-color;      
    &.right-edge
      &:before
        border-right-color: border-color;
        border-top-color: border-color;
        
      & > span
        &:after
          border-color: background-color background-color background-color transparent;

        &:before
          border-right-color: border-color;
          border-top-color: border-color;
              
            
!

JS

              
                
              
            
!
999px

Console