cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <!-- This popup has its own arrow, a shadow, and will size itself accordingly to the content within -->
<div class="popup"> 
  <div class="arrow shadow"></div>
  <div class="content">
    Some Content
  </div>
  <div class="arrow"></div>
</div>
            
          
!
            
              /* It's important these values are the same for each part. */
$background: #fff;
$border: 1px solid #e3e3e3;
$shadow: 0 0 5px #CCC;
$arrow-loc: 50px;
$arrow-size: 20px;
$arrow-diag: 14px;
// Example alternate calculation
// $arrow-size: 40px;
// $arrow-diag: 28px;  //√2*$arrow-size / 2


.popup {
  positon: relative;
  display: inline-block;
  margin-top: $arrow-diag;
}


.content {
  background-color: $background;
  border: $border;
  box-shadow: $shadow;
  position: relative;
  display: inline-block;
  padding: $arrow-diag;  // must be at least $arrow-diag
  min-width: $arrow-loc; // must be at least $arrow-loc

  
  /* Un-important style elements for example */
  text-align: center;
}


.arrow {
  background-color: $background;
  position: absolute;
  left: $arrow-loc;
  width: $arrow-size;
  height: $arrow-size;
  transform: rotate(45deg);
  top: $arrow-diag/2;
  
  &.shadow {
    border: $border;
    box-shadow: $shadow;
  }
}

            
          
!
999px
Loading ..................

Console