cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <div class="flex-container">
  <button type="button" class="has-tooltip" aria-label="Close">&#x2715;</button>
</div>
            
          
!
            
              // Nice defaults
html, body {
  height: 100%;
  width: 100%;
}
.flex-container {
  width: 100%;
  height: 100%;
  display: flex;
}
button {
  background-color: #ECA400;
  background-image: linear-gradient(to bottom, #ECA400 0%, #EC0000 100%);
  border: 0;
  border-radius: 5px;
  box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2) inset;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  height: 40px;
  margin: auto;
  padding: 10px;
  width: 100px;
}

// Styled hovers of additional descriptive content
.has-tooltip {
  position: relative;
}
.has-tooltip::before {
  background: #001D4A;
  border-radius: 5px;
  color: #FFF;
  content: attr(aria-label);
  display: inline-block;
  font-weight: normal;
  left: 50%;
  margin-top: (1px - 10px);
  opacity: 0;
  padding: 10px;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: translate(-50%, 0%);
  white-space: nowrap;
  width: auto;
  z-index: 2;
  -webkit-transition: all .15s ease-out;
  transition: all .15s ease-out;
	
  .lt-ie9 & {
    // IE8 requires dimensions to be set to center tooltip, set sensible constraints here
    margin-left: -110px;
		margin-top: -41px;
    // titles that are longer than this will expand to fit but not be centered;
		min-width: 200px;
    text-align: center;
  }
}
.has-tooltip:hover:before,
.has-tooltip:focus:before {
  opacity: 1;
  transform: translate(-50%, -100%);
}
.has-tooltip:after {
  border: 10px solid transparent;
  border-top-color: #001D4A;
  content: "";
  height: 0;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px - 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: translate(0, -100%);
  -webkit-transition: all 0s ease-out 0s;
  transition: all 0s ease-out 0s;
  width: 0;
  z-index: 1;
}
.has-tooltip:hover:after,
.has-tooltip:focus:after {
  opacity: 1;
  -webkit-transition: all .15s ease-out .1s;
  transition: all .15s ease-out .1s;
  transform: translate(0, 0);
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console