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

              
                <div class="matrix">
  <div class="quad it">
    <h1>IT</h1>
    
    <a href="#" data-tooltip="Angular" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="DNS" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="Ember" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="LAMP" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="MySQL" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="Performance" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
  </div>
  <div class="quad bed">
    <h1>Back End Development</h1>
    
    <a href="#" data-tooltip="API" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="Command Line" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="Grunt/Gulp" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="Javascript" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="PHP" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="Python" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="Rails" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="React" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
  </div>
  <div class="quad fed">
    <h1>Front End Development</h1>
    
      <a href="#" data-tooltip="Accessibility" data-placement="top" data-trigger="hover" class="tooltip">
        <svg viewBox="0 0 100 100">
          <circle cx="50" cy="50" r="45"/>
        </svg>
      </a>
    
      <a href="#" data-tooltip="Bootstrap" data-placement="top" data-trigger="hover" class="tooltip">
        <svg viewBox="0 0 100 100">
          <circle cx="50" cy="50" r="45"/>
        </svg>
      </a>
    
      <a href="#" data-tooltip="Cross Browser" data-placement="top" data-trigger="hover" class="tooltip">
        <svg viewBox="0 0 100 100">
          <circle cx="50" cy="50" r="45"/>
        </svg>
      </a>
    
      <a href="#" data-tooltip="HTML/CSS" data-placement="top" data-trigger="hover" class="tooltip">
          <svg viewBox="0 0 100 100">
            <circle cx="50" cy="50" r="45"/>
          </svg>
      </a>
    
     <a href="#" data-tooltip="RWD" data-placement="top" data-trigger="hover" class="tooltip">
       <svg viewBox="0 0 100 100">
         <circle cx="50" cy="50" r="45"/>
       </svg>
     </a>
    
    <a href="#" data-tooltip="jQuery" data-placement="top" data-trigger="hover" class="tooltip">
       <svg viewBox="0 0 100 100">
         <circle cx="50" cy="50" r="45"/>
       </svg>
    </a>
    
    <a href="#" data-tooltip="SEO" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="SVG" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="Typography" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="WordPress" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
  </div>
  <div class="quad design">
    <h1>Design</h1>
    
    <a href="#" data-tooltip="Photoshop" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="Style Guides" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
    
    <a href="#" data-tooltip="Wireframes" data-placement="top" data-trigger="hover" class="tooltip">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
      </svg>
    </a>
  </div>
</div>
              
            
!

CSS

              
                body {
  font-family: 'Open Sans', sans-serif;
}

.matrix {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

h1 {
  text-align: center;
}

.quad {
  display: flex;
  flex: 1 1 50%;
  height: 50vh;
  justify-content: center;
  align-items: center;
  color: #fff;
}

svg {
  position: absolute;
  width: 15px;
  height: 15px;
}

circle {
  fill: red;
  
  &:hover {
    stroke: white;
    stroke-width: 10;
  }
}

.design {
  background: #00BDDB;
  order: 1;
}

.fed {
  background: #008196;
  order: 2;
}

.bed {
  background: #2C555C;
  order: 3;
}

.it {
  background: #004F5C;
  order: 4;
}

/* Variables
-----------------------------*/
$prefix 	 : tooltip;
$contentAttr : data-tooltip;
$trigger	 : data-trigger;
$placement	 : data-placement;

.#{$prefix} {
	position: relative;
	outline: none;
  font-size: 14px;
  
	/* Tooltip
	--------------------*/
	&:after,
	&:before {
		position: absolute;
		display: none\9; //:after:hover doesn't work with ie8
		opacity: 0;
		transition: opacity .20s linear 0s;
		visibility: hidden;
		outline: none;
		text-decoration: none;
	}
	&:after {
    content: attr(#{$contentAttr});
		padding: 5px;
		background-color: black;
		background-color: rgba(black, .8);
		color: white;
		white-space: nowrap;		
	}
	
	/* Tooltip trigger
	--------------------*/	
	&[#{$trigger}="hover"]:hover:before,
	&[#{$trigger}="hover"]:hover:after,
	&[#{$trigger}="focus"]:focus:before,
	&[#{$trigger}="focus"]:focus:after {
		display: block\9; //:after:hover doesn't work with ie8
		opacity: 1;
		transition: opacity .20s linear 0s;
		visibility: visible;
		z-index: 2;
	}
	
	/* Tooltip placement top
	----------------------------*/
	&[#{$placement}="top"]:after,
	&[#{$placement}="top"]:before {
		bottom: 100%;
	}
  
	&[#{$placement}="top"]:after {
    left: 0;
		margin: 0 0 15px 0;
		border-radius: 4px;
		transform: translate(-50%);
	}
  
	&[#{$placement}="top"]:before {
    content: "";
		left: 0;
		transform: translate(-50%);
		border-right: 8px solid transparent;
		border-left: 8px solid transparent;
		border-top: 8px solid black;
		border-top: 8px solid rgba(black, .8);
		margin: 0 0 7px 0;
	}
}

// Design-FED
[#{$contentAttr}="Accessibility"] {
  top: 25%;
  right: 75%;
}

[#{$contentAttr}="Bootstrap"] {
  bottom: 15%;
  right: 35%;
}

[#{$contentAttr}="Cross Browser"] {
  top: 2%;
  right: 25%;
}

[#{$contentAttr}="HTML/CSS"] {
  bottom: 25%;
  right: 70%;
}

[#{$contentAttr}="jQuery"] {
  bottom: 15%;
  right: 45%;
}

[#{$contentAttr}="Photoshop"] {
  bottom: 20%;
  left: 40.5%;
}

[#{$contentAttr}="RWD"] {
  right: 75%;
}

[#{$contentAttr}="SEO"] {
  bottom: 20%;
  right: 40%;
}

[#{$contentAttr}="SVG"] {
  bottom: 20%;
  right: 75%;
}

[#{$contentAttr}="Style Guides"] {
  bottom: 30%;
  left: 10%;
}

[#{$contentAttr}="Typography"] {
  bottom: 25%;
  right: 83%;
}

[#{$contentAttr}="Wireframes"] {
  top: 20%;
  left: 35%;
}

// IT-BED
[#{$contentAttr}="Angular"] {
  top: 15%;
  right: 70%;
}

[#{$contentAttr}="LAMP"] {
  top: 30%;
}

[#{$contentAttr}="API"] {
  bottom: 20%;
  left: 20%;
}

[#{$contentAttr}="Command Line"] {
  top: 30%;
  left: 19%;
}

[#{$contentAttr}="DNS"] {
  bottom: 0;
  right: 40%;
}

[#{$contentAttr}="Ember"] {
  top: 5%;
  right: 70%;
}

[#{$contentAttr}="Grunt/Gulp"] {
  top: 5%;
  right: 10%;
}

[#{$contentAttr}="Javascript"] {
  bottom: 30%;
  left: 15%;
}

[#{$contentAttr}="MySQL"] {
  top: 20%;
  right: 50%;
}

[#{$contentAttr}="Performance"] {
  bottom: 55%;
  right: 53.5%;
}

[#{$contentAttr}="PHP"] {
  top: 30%;
  right: 15%;
}

[#{$contentAttr}="Python"] {
  top: 30%;
  right: 35%;
}

[#{$contentAttr}="Rails"] {
  top: 10%;
  right: 25%;
}

[#{$contentAttr}="React"] {
  bottom: 10%;
  left: 5%;
}

[#{$contentAttr}="WordPress"] {
  top: 43%;
  right: 78.5%;
}
              
            
!

JS

              
                
              
            
!
999px

Console