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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <br><br><br>
<p>
  The intersection of <a href="#" title="Tooltip Digital money">Digital money</a> and traditional finance is at 400 South LaSalle Street in Chicago this weekend. That’s where trading in bitcoin futures opens <a href="#" title="Sunday">Sunday</a> evening, as the first major U.S. exchange offers a product pegged to the wildly fluctuating cryptocurrency.

The currency has risen more than 1,500 percent this year, and about 85 percent just in the past two weeks, driven largely by demand from individual investors. But even as bitcoin -- launched in 2009 as an alternative to banks -- divides Wall Street executives and central bankers worldwide, those kinds of gains are a powerful magnet.

  The futures offered by Cboe <a href="#" title="Global Markets Inc.">Global Markets Inc.</a>, and similar contracts that start trading in a week at at another Chicago-based exchange, CME Group Inc., may open the door to greater inflows of institutional money, while also making it easier to bet on bitcoin’s decline. Either way, it’s likely trading will start slowly, said Mike Novogratz, chief executive officer of Galaxy Investment Partners, which is raising a crypto hedge fund targeted at $500 million.

“If people have expectations that it’s going to have huge liquidity on day one, they’re just wrong,” Novogratz said Thursday in Toronto. “It’s going to take a while to build liquidity. People need to go through at least one cycle to figure out how it settles.”
</p>
              
            
!

CSS

              
                .tooltip {    
    position: absolute;
    background: #646464;
    border-radius:4px;
    padding: 6px 12px;
    font-family: arial;
    font-size: 12px;
    text-shadow: 0px 1px 1px #000;
    color: #ffc64a;
  }
  .tooltip:before {
    content : " ";
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #646464;
    position:absolute;
    bottom:-5px;
    left:5px;
  }
              
            
!

JS

              
                (function(){
  var links = document.links;
  for(var i=0; i < links.length; i++){
     var a = links[i];
     if(a.title !== ''){
       a.addEventListener('mouseover',createTip);
       a.addEventListener('mouseout',cancelTip);
     }
    //console.log(a);
  } 
  function createTip(ev){
      var title = this.title;
      this.title = '';
      this.setAttribute("tooltip", title);
      var tooltipWrap = document.createElement("div"); //creates div
      tooltipWrap.className = 'tooltip'; //adds class
      tooltipWrap.appendChild(document.createTextNode(title)); //add the text node to the newly created div.

      var firstChild = document.body.firstChild;//gets the first elem after body
      firstChild.parentNode.insertBefore(tooltipWrap, firstChild); //adds tt before elem 
      var padding = 5;
      var linkProps = this.getBoundingClientRect();
      var tooltipProps = tooltipWrap.getBoundingClientRect(); 
      var topPos = linkProps.top - (tooltipProps.height + padding);
      tooltipWrap.setAttribute('style','top:'+topPos+'px;'+'left:'+linkProps.left+'px;');
      
  }
  function cancelTip(ev){
      var title = this.getAttribute("tooltip");
      this.title = title;
      this.removeAttribute("tooltip");
      document.querySelector(".tooltip").remove();
  }
})();
              
            
!
999px

Console