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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500' rel='stylesheet' type='text/css'>
<div class="content-card">
  <div class="header">
    Pure CSS Dismissable tooltips
 </div>
  <p>Using pseudo elements, data-attributes, and a little trick from Hugo Giraudel, we can create dismissible tooltips with pure CSS. Here's the <span class="d-tt" data-d-tooltip="Just click and hold to dismiss tooltip!">demo</span>.</p>
</div>   
              
            
!

CSS

              
                body{
  margin: 0;
  padding: 0;
  background: url(https://subtlepatterns.com/patterns/geometry.png) repeat;
  font-family: "roboto" sans-serif;
}

.content-card{
  width: 600px;
  padding: 0px 0px 15px 0px;
  background-color:#FFFFFF;
  margin-left: auto;
  margin-right: auto;
  margin-top: 150px;
  box-shadow: 0px 1px 3px rgba(0,0,0,0.15);
}

.content-card .header{
  width: 100%;
  padding: 10px;
  color: #ffffff;
  font-weight: 500;
  background-color: #f28771;
  box-sizing: border-box;
}

.map-icon{
  float: right;
}
.map-icon img{
  width: 14px;
}

p{
  padding: 15px 40px 15px 40px;
  font-size: 18px;
  line-height: 26px;
  color: #434343;
}

.d-tt{
  color: #f28771;
  cursor: pointer;
  position: relative;
  -webkit-transition: all 0.3s ease-in-out;
   border-bottom: 1px dotted rgba(229, 107, 107, 0)
}

.d-tt::after{
  content: attr(data-d-tooltip);
  position: absolute;
  width: 150px;
  background-color: #3a3f4f;
  padding: 15px 15px;
  font-size: 13px;
  line-height: 18px;
  margin: 0 auto;
  left: -50%;
  color: #FFFFFF;
  border-radius: 5px;
  bottom: 25px;
  margin-left: -999em;
  outline: 20px solid transparent;
  box-shadow: 0px 1px 3px rgba(0,5,30,0.15);
  -webkit-transition: left 0s 9999999s;
}

.d-tt:active::after, .d-tt:active::before{
  left: -999em;
  opacity: 0;
  -webkit-transform: scale(0);
  -webkit-transition: left 0s 0.3s, opacity 0.3s cubic-bezier(0.4,0.46,0.32,1.275), -webkit-transform 0.3s cubic-bezier(0.4,0.46,0.32,1.275);
}

.d-tt::before{
  content:"";
  width: 0;
	height: 0;
  position: absolute;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 6px solid #3a3f4f;
  bottom: 20px;
  margin-left: -999em;
  -webkit-transition: left 0s 9999999s;
}

.d-tt:hover{
  border-bottom: 1px dotted rgba(229, 107, 107, 1);
}

@-webkit-keyframes showTt {
  0%   { -webkit-transform: scale(0) translateY(0px); opacity: 0; }
  60% { -webkit-transform: scale(1.05) translateY(0px); opacity: 1; }
  80%{-webkit-transform: scale(0.95) translateY(0px); opacity: 1;}
  100%{-webkit-transform: scale(1) translateY(0px); opacity: 1;}
}
@-webkit-keyframes showAr {
  0%   { -webkit-transform:  translateY(-7px); opacity: 0; }
  60% { -webkit-transform: translateY(0px); opacity: 1;}
  80%{-webkit-transform: translateY(-1px); opacity: 1;}
  100%{-webkit-transform:  translateY(0px); opacity: 1;}
}

.d-tt:hover::after{
  -webkit-animation: showTt 0.3s cubic-bezier(0.4,0.46,0.32,1.275) ;
  margin-left: 0px;
}
.d-tt:hover::before{
   -webkit-animation: showAr 0.3s cubic-bezier(0.645,0.045,0.355,1) ;
  margin-left: 0px;
 }


              
            
!

JS

              
                
              
            
!
999px

Console