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.

              <h1>Using the css data-attribute function<small><br>for a sexy CSS hover On this cool button</small></h1>

<p>Great to use for lightweight tooltips</p>

<button data-hover="this is the data-hover content">hover me</button>

              @btn-color: #DB701F;
html {
  font-family: Georgia, serif;
  color: #888;
body {
  padding: 5em 2em;
  text-align: center;
  background: #f3f3f3;
button {
  background: @btn-color;
  border: solid 7px #000;
  padding: 20px;
  box-shadow: inset 0 0 6px darken(@btn-color,20%);
  text-transform: uppercase;
  font-weight: bold;
  font-family: "Tahoma", sans-serif;
  text-shadow: 1px 1px 3px darken(@btn-color,20%);
  color: #fff;
  position: relative;
  width: 300px;
  &:hover {
    background: green;
    &:before {
      /* ------- THIS IS THE MAGIC ----------------*/
      content: attr(data-hover);
      /* ------------------------------------------*/
      display: block;
      background: #000;
      position: absolute;
      top: 100%;
      left: -7px;
      right: -7px;
      padding: 15px; 
    &:after {
      content: "";
      position: absolute;
      display: block;
      width: 0;
      height: 0;
      border: solid 10px transparent;
      border-bottom-color: #000;
      bottom: 0;
      left: 50%;
      margin-left: -10px;
      z-index: 2;

.note {
  margin-top: 100px;
  display: block;
Loading ..................