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="main-container">
  <div class="teamy-team scroller">
    <div class="scroller__box">
      <div class="scroller__item"> 
        <div class="teamy teamy_mask-circle">
          <div class="teamy__layout">
            <div class="teamy__preview">
              <img src="https://stas-melnikov.ru/cliparts/girl2_424x640.jpg" class="teamy__avatar" alt="The demo photo">
            </div>
            <div class="teamy__back">
              <div class="teamy__back-inner">
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#twitter"></use></svg>
                  <span class="social__name">Twitter</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#codepen"></use></svg>
                  <span class="social__name">Codepen</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#linkedin"></use></svg>
                  <span class="social__name">LinkedIn</span>
                </a>
              </div>
            </div>
          </div>
          <div class="teamy__content">
            <span class="teamy__name">Suzan Lois</span>
            <span class="teamy__post">Graphic Designer</span>
          </div>
        </div>
      </div>
      <div class="scroller__item"> 
        <div class="teamy teamy_mask-circle teamy_zoom-photo">
          <div class="teamy__layout">
            <div class="teamy__preview">
              <img src="https://stas-melnikov.ru/cliparts/girl3_424x640.jpg" class="teamy__avatar" alt="The demo photo">
            </div>
            <div class="teamy__back">
              <div class="teamy__back-inner">
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#twitter"></use></svg>
                  <span class="social__name">Twitter</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#codepen"></use></svg>
                  <span class="social__name">Codepen</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#linkedin"></use></svg>
                  <span class="social__name">LinkedIn</span>
                </a>
              </div>
            </div>
          </div>
          <div class="teamy__content">
            <span class="teamy__name">Dora Caelan</span>
            <span class="teamy__post">HR-manager</span>
          </div>
        </div>
      </div>
      <div class="scroller__item"> 
        <div class="teamy teamy_mask-circle teamy_zoom-rotate-photo">
          <div class="teamy__layout">
            <div class="teamy__preview">
              <img src="https://stas-melnikov.ru/cliparts/girl4_424x640.jpg" class="teamy__avatar" alt="The demo photo">
            </div>
            <div class="teamy__back">
              <div class="teamy__back-inner">
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#twitter"></use></svg>
                  <span class="social__name">Twitter</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#codepen"></use></svg>
                  <span class="social__name">Codepen</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#linkedin"></use></svg>
                  <span class="social__name">LinkedIn</span>
                </a>
              </div>
            </div>
          </div>
          <div class="teamy__content">
            <span class="teamy__name">Rosanna Pattie</span>
            <span class="teamy__post">Illustrator</span>
          </div>
        </div>
      </div>
      <div class="scroller__item"> 
        <div class="teamy teamy_mask-circle teamy_zoom-slide-photo">
          <div class="teamy__layout">
            <div class="teamy__preview">
              <img src="https://stas-melnikov.ru/cliparts/girl5_424x640.jpg" class="teamy__avatar" alt="The demo photo">
            </div>
            <div class="teamy__back">
              <div class="teamy__back-inner">
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#twitter"></use></svg>
                  <span class="social__name">Twitter</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#codepen"></use></svg>
                  <span class="social__name">Codepen</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#linkedin"></use></svg>
                  <span class="social__name">LinkedIn</span>
                </a>
              </div>
            </div>
          </div>
          <div class="teamy__content">
            <span class="teamy__name">Rose Alpha</span>
            <span class="teamy__post">Photographer</span>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="teamy-team scroller">
    <div class="scroller__box">
      <div class="scroller__item"> 
        <div class="teamy teamy_mask-triangle">
          <div class="teamy__layout">
            <div class="teamy__preview">
              <img src="https://stas-melnikov.ru/cliparts/man1_424x640.jpg" class="teamy__avatar" alt="The demo photo">
            </div>
            <div class="teamy__back">
              <div class="teamy__back-inner">
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#twitter"></use></svg>
                  <span class="social__name">Twitter</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#codepen"></use></svg>
                  <span class="social__name">Codepen</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#linkedin"></use></svg>
                  <span class="social__name">LinkedIn</span>
                </a>
              </div>
            </div>
          </div>
          <div class="teamy__content">
            <span class="teamy__name">Tyson Amery</span>
            <span class="teamy__post">UI designer</span>
          </div>
        </div>
      </div>
      <div class="scroller__item">         
        <div class="teamy teamy_mask-triangle teamy_zoom-photo">
          <div class="teamy__layout">
            <div class="teamy__preview">
              <img src="https://stas-melnikov.ru/cliparts/man2_424x640.jpg" class="teamy__avatar" alt="The demo photo">
            </div>
            <div class="teamy__back">
              <div class="teamy__back-inner">
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#twitter"></use></svg>
                  <span class="social__name">Twitter</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#codepen"></use></svg>
                  <span class="social__name">Codepen</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#linkedin"></use></svg>
                  <span class="social__name">LinkedIn</span>
                </a>
              </div>
            </div>
          </div>
          <div class="teamy__content">
            <span class="teamy__name">Stas Melnikov</span>
            <span class="teamy__post">UI developer</span>
          </div>
        </div>
      </div>
      <div class="scroller__item">         
        <div class="teamy teamy_mask-triangle teamy_zoom-rotate-photo">
          <div class="teamy__layout">
            <div class="teamy__preview">
              <img src="https://stas-melnikov.ru/cliparts/girl6_424x640.jpg" class="teamy__avatar" alt="The demo photo">
            </div>
            <div class="teamy__back">
              <div class="teamy__back-inner">
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#twitter"></use></svg>
                  <span class="social__name">Twitter</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#codepen"></use></svg>
                  <span class="social__name">Codepen</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#linkedin"></use></svg>
                  <span class="social__name">LinkedIn</span>
                </a>
              </div>
            </div>
          </div>
          <div class="teamy__content">
            <span class="teamy__name">Lise Laurie</span>
            <span class="teamy__post">Photomodel</span>
          </div>
        </div>
      </div>
      <div class="scroller__item">         
        <div class="teamy teamy_mask-triangle teamy_zoom-slide-photo">
          <div class="teamy__layout">
            <div class="teamy__preview">
              <img src="https://stas-melnikov.ru/cliparts/girl1_424x640.jpg" class="teamy__avatar" alt="The demo photo">
            </div>
            <div class="teamy__back">
              <div class="teamy__back-inner">
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#twitter"></use></svg>
                  <span class="social__name">Twitter</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#codepen"></use></svg>
                  <span class="social__name">Codepen</span>
                </a>
                <a href="#0" class="social">
                  <svg class="social__icon"><use xlink:href="#linkedin"></use></svg>
                  <span class="social__name">LinkedIn</span>
                </a>
              </div>
            </div>
          </div>
          <div class="teamy__content">
            <span class="teamy__name">Effie Eleanora</span>
            <span class="teamy__post">Web-designer</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<svg width="26" height="28" style="display: none;">
  <symbol id="twitter" viewBox="0 0 26 28">
    <path d="M25.312 6.375c-0.688 1-1.547 1.891-2.531 2.609 0.016 0.219 0.016 0.438 0.016 0.656 0 6.672-5.078 14.359-14.359 14.359-2.859 0-5.516-0.828-7.75-2.266 0.406 0.047 0.797 0.063 1.219 0.063 2.359 0 4.531-0.797 6.266-2.156-2.219-0.047-4.078-1.5-4.719-3.5 0.313 0.047 0.625 0.078 0.953 0.078 0.453 0 0.906-0.063 1.328-0.172-2.312-0.469-4.047-2.5-4.047-4.953v-0.063c0.672 0.375 1.453 0.609 2.281 0.641-1.359-0.906-2.25-2.453-2.25-4.203 0-0.938 0.25-1.797 0.688-2.547 2.484 3.062 6.219 5.063 10.406 5.281-0.078-0.375-0.125-0.766-0.125-1.156 0-2.781 2.25-5.047 5.047-5.047 1.453 0 2.766 0.609 3.687 1.594 1.141-0.219 2.234-0.641 3.203-1.219-0.375 1.172-1.172 2.156-2.219 2.781 1.016-0.109 2-0.391 2.906-0.781z"></path>
  </symbol>
  <symbol id="codepen" viewBox="0 0 28 28">
    <path d="M3.375 18.266l9.422 6.281v-5.609l-5.219-3.484zM2.406 16.016l3.016-2.016-3.016-2.016v4.031zM15.203 24.547l9.422-6.281-4.203-2.812-5.219 3.484v5.609zM14 16.844l4.25-2.844-4.25-2.844-4.25 2.844zM7.578 12.547l5.219-3.484v-5.609l-9.422 6.281zM22.578 14l3.016 2.016v-4.031zM20.422 12.547l4.203-2.812-9.422-6.281v5.609zM28 9.734v8.531c0 0.391-0.203 0.781-0.531 1l-12.797 8.531c-0.203 0.125-0.438 0.203-0.672 0.203s-0.469-0.078-0.672-0.203l-12.797-8.531c-0.328-0.219-0.531-0.609-0.531-1v-8.531c0-0.391 0.203-0.781 0.531-1l12.797-8.531c0.203-0.125 0.438-0.203 0.672-0.203s0.469 0.078 0.672 0.203l12.797 8.531c0.328 0.219 0.531 0.609 0.531 1z"></path>
  </symbol>
  <symbol id="linkedin" viewBox="0 0 24 28">
    <path d="M5.453 9.766v15.484h-5.156v-15.484h5.156zM5.781 4.984c0.016 1.484-1.109 2.672-2.906 2.672v0h-0.031c-1.734 0-2.844-1.188-2.844-2.672 0-1.516 1.156-2.672 2.906-2.672 1.766 0 2.859 1.156 2.875 2.672zM24 16.375v8.875h-5.141v-8.281c0-2.078-0.75-3.5-2.609-3.5-1.422 0-2.266 0.953-2.641 1.875-0.125 0.344-0.172 0.797-0.172 1.266v8.641h-5.141c0.063-14.031 0-15.484 0-15.484h5.141v2.25h-0.031c0.672-1.062 1.891-2.609 4.672-2.609 3.391 0 5.922 2.219 5.922 6.969z"></path>
  </symbol>
</svg>
              
            
!

CSS

              
                
/*
* 1. core styles
*/

.teamy{
  position: relative;
}

.teamy__layout{
  position: relative;
  overflow: hidden;
}

.teamy__layout:before{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
}

.teamy__avatar{
  display: block;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

.teamy__back{
  display: none;
}

.teamy:hover .teamy__back{
  width: 100%;
  height: 100%;  
  display: flex;

  position: absolute;
  top: 0;
  left: 0;    
  z-index: 3;
}

.teamy__back-inner{
  margin: auto;
  will-change: opacity;
  animation: fade .4s cubic-bezier(0.71, 0.05, 0.29, 0.9) .2s both;
}

@keyframes fade{
  0%{
    opacity: 0;
  }

  100%{
    opacity: 1;
  }  
}

.teamy__name, .teamy__post{
  display: block;
}

/*
* 2. visual styles
*/

/* common styles for visual styles */

.teamy{
  font-size: 1.6rem;
  text-align: center;
}

.teamy__back-inner{
  padding: 20px;
}

.teamy__content{
  padding: 20px;
}

.teamy__name{
  font-size: 1.5em;
  font-weight: 700;
}

.teamy__post{
  margin-top: .5em;
  font-size: .9em;
  text-transform: uppercase;
}

/*
* 3. masks
*/

/* mask circle */

.teamy_mask-circle .teamy__layout:before{
  width: 0;
  height: 0;
  padding: 25%;
  border-radius: 50%;

  transition: transform .3s ease, opacity .3s ease-out;
  will-change: opacity, transform;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

.teamy_mask-circle:hover .teamy__layout:before{
  opacity: 1;
  transform: translate(-50%, -50%) scale(4);
  transition-duration: .6s;
}

/* mask triangle */

.teamy_mask-triangle .teamy__layout:before{
  width: 100%;
  height: 100%;
  opacity: 0;
  clip-path: polygon(50% 10%, 15% 90%, 85% 90%);

  transition-property: transform, opacity;
  transition-duration: .2s, .4s;
  transition-delay: .4s, 0s;
  transition-timing-function: ease-out;

  will-change: transform, opacity;
  transform: translate(-50%, -50%) scale(1);
}

.teamy_mask-triangle:hover .teamy__layout:before{
  opacity: 1;
  transform: translate(-50%, -50%) scale(5);
  transition-delay: .1s, 0s;
  transition-duration: .4s;
}

/*
* 4. animations for preview
*/

/* zoom */

.teamy_zoom-photo .teamy__avatar{
  transition: transform .4s cubic-bezier(0.71, 0.05, 0.29, 0.9);
  will-change: transform;
  transform: scale(1);
}

.teamy_zoom-photo:hover .teamy__avatar{
  transform: scale(1.2);
}

/* zoom and rotate */

.teamy_zoom-rotate-photo .teamy__avatar{
  transition: transform .4s cubic-bezier(0.71, 0.05, 0.29, 0.9);
  will-change: transform;
  transform: scale(1) rotate(0);
}

.teamy_zoom-rotate-photo:hover .teamy__avatar{
  transform: scale(1.2) rotate(5deg);
}

/* zoom and slide */

.teamy_zoom-slide-photo .teamy__avatar{
  transition: transform .4s cubic-bezier(0.71, 0.05, 0.29, 0.9);
  will-change: transform;
  transform: scale(1) translate(0, 0);
}

.teamy_zoom-slide-photo:hover .teamy__avatar{
  transform: scale(1.2) translate(4%, 4%);
}

/*
* 5. default skin
*/

.teamy__layout:before{
  background-color: rgba(72, 27, 174, .7);
}

/*
* touch scroller 
*/

/*
=====
LEVEL 1. CORE STYLES
=====
*/

@media (max-width: 1024px){

  .scroller{
    --uiScrollerNumberVisibleItems: var(--scrollerNumberVisibleItems, 1);
    overflow: hidden;
  }

  .scroller__box{
    overflow-x: scroll;
    overflow-y: hidden;
    white-space: nowrap;
    font-size: 0;
    -webkit-overflow-scrolling: touch;
  }

  .scroller__item{
    width: calc(100% / var(--uiScrollerNumberVisibleItems));
    display: inline-block;
    vertical-align: top;
    white-space: normal;
    font-size: initial;
  }
}

/*
* demo
*/

@media (max-width: 360px){
  
  .teamy-team{
    --scrollerNumberVisibleItems: 1.2;
  }
}

@media (min-width: 361px) and (max-width: 480px){
  
  .teamy-team{
    --scrollerNumberVisibleItems: 1.8;
  }
}

@media (min-width: 481px) and (max-width: 1024px){
  
  .teamy-team{
    --scrollerNumberVisibleItems: 2.8;
  }
}

@media (min-width: 1025px){
  
  .scroller__box{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .scroller__item{
    width: 25%;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console