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.

            
              <!--
OpenShare Example
http://openshare.social
-->

<div class="open-share-examples">
  <a class="open-share-example" href="#"
    data-open-share="twitter"
    data-open-share-url="http://digitalsurgeons.com">

    <span class="open-share-example__icon socicon-twitter"></span>
  </a>

  <a class="open-share-example" href="#"
    data-open-share="facebook"
    data-open-share-link="http://digitalsurgeons.com">

    <span class="open-share-example__icon socicon-facebook"></span>
  </a>

  <a class="open-share-example" href="#"
    data-open-share="pinterest"
    data-open-share-url="http://digitalsurgeons.com"
    data-open-share-media="http://www.digitalsurgeons.com/img/about/bg_office_team.jpg"
    data-open-share-description="Digital Surgeons">

    <span class="open-share-example__icon socicon-pinterest"></span>
  </a>

  <a class="open-share-example" href="#"
    data-open-share="reddit"
    data-open-share-url="http://digitalsurgeons.com"
    data-open-share-title="Digital Surgeons">

    <span class="open-share-example__icon socicon-reddit"></span>
  </a>

  <a class="open-share-example" href="#"
    data-open-share="google-maps"
    data-open-share-type="display"
    data-open-share-center="40.765819,-73.975866"
			    data-open-share-views="traffic"
    			data-open-share-zoom="14"
    data-open-share-ios="true">

    <span class="open-share-example__icon fa fa-map-marker"></span>
  </a>
				</div>
            
          
!
            
              body {
  background: #ddd;
}

.open-share-examples {
  transform: translateY(-50%);
  width: 100%;
  text-align: center;
  position: absolute;
  top: 50%;
}

.open-share-example {
  transform: translateZ(0);
	transition: .75s;
	background: #4f70d6;
	border-radius: 3.75em;
	color: #fff;
	display: inline-block;
	font-size: 1.3em;
	height: 2.625em;
	line-height: 3.0625em;
	margin: .5em;
	position: relative;
	text-align: center;
	text-decoration: none;
	width: 2.625em;
}

.open-share-example__icon {
  transform:  translateZ(0) translateZ(0);
  transition: .75s;
  display: inline-block;
  transform-origin: 48% 45%;
}

.open-share-example--square {
  @extend .open-share-example;
  background: #94379f;
  border-radius: 0;
}

.open-share-example--diamond {
  @extend .open-share-example;
  transform: scale(1.1) rotate(135deg)  translateZ(0);
  background: #652d7f;
  border-radius: 0;
  
  .open-share-example__icon {
    transform: rotate(-135deg)  translateZ(0);
  }
}

.open-share-example--rectangle {
  @extend .open-share-example;
  transform: scale(1) rotate(0)  translateZ(0);
  background: #5e7efd;
  border-radius: 0;
  width: 4em;
  margin: .25em;
  
  .open-share-example__icon {
    transform: rotate(0) translateZ(0);
  }
}

.open-share-example--rectangle-vert {
  transform: scale(1) rotate(-90deg)  translateZ(0);
  background: #ffffff;
  margin: 0;
  width: 2.125em;
  
  .open-share-example__icon {
    transform: rotate(90deg) translateZ(0);
    color: #4f70d6
  }
}

.open-share-example .fa {
  position: relative;
	top: -4px;
}

.open-share-example__count {
	transition: .3s;
	transform: translate(-50%, 20px);
	background: #333;
	font-size: 12px;
	left: 50%;
	line-height: 1;
	opacity: 0;
	padding: 10px;
	position: absolute;
	top: -50px;

	&::after {
		transform: translateX(-50%);
		border-left: 7px solid transparent;
		border-right: 7px solid transparent;
		border-top: 10px solid #333;
		bottom: -9px;
		content: '';
		display: block;
		height: 0;
		left: 50%;
		position: absolute;
		width: 0;
	}
}

.open-share-example:hover .open-share-example__count {
	opacity: 1;
	transform: translate(-50%, 0);
}

.open-share-example--diamond,
.open-share-example--rectangle,
.open-share-example--rectangle-vert {
  .open-share-example__count {
    display: none;
  }
}
            
          
!
            
              var openShareNodes = document.querySelectorAll('.open-share-examples [data-open-share]'),
    animationMods = [
      'square',
      'diamond',
      'rectangle',
      'rectangle-vert',
      ''
    ];

function animationLoop() {
  // loop through each animation modifier
  animationMods.forEach((mod, i, arr) => {
    
    // wait a second in between each animation segment
    setTimeout(() => {
      
      // loop through open share nodes
      [].forEach.call(openShareNodes, (node, j) => {
        
        // delay by index * 100ms
        setTimeout(function() {
          
          // out of mods so reset
          if(!mod) {
            this.setAttribute('class', 'open-share-example');
            
           // apply mod
          } else {
            this.classList.add(`open-share-example--${mod}`);
          }
          
        // bind node to setTimeout so reference doesn't change on each loop
        }.bind(node), j * 100);
      });
    }, i * 1000); 
  });
}

document.addEventListener('DOMContentLoaded', function() {
  setInterval(animationLoop, 6000);
  animationLoop();
});
            
          
!
999px
Loading ..................

Console