<div class="wrap">
<input type="checkbox" />
  <h1><sub><b>🥖</b>Su<span>b</span></sub></h1>
  <h1><sup><b>👋</b>Su<span>p</span></sup></h1>
</div>
@import "compass";



body {
  display: flex;
  width: 100%;
  height: 100vh;
  max-width:100vw;
  justify-content: center;
  align-items: center;
  background: linear-gradient(45deg, #ed4264, #ffedbc);
  overflow:hidden;
  .wrap {
    width: 250px;
    height: 200px;
    position: relative;
    min-width:250px;
    &:after{
      content:'Click Me';
      position:absolute;
      color:rgba(0,0,0,0.25);
      font-size:10px;
      bottom:-30px;
      width:100%;
      text-align:center;
    }
    input {
      position: absolute;
      width: 100%;
      height: 100%;
      opacity: 0;
      z-index: 999;
      &:checked ~ h1 {
        sub,
        sup {
          top: -30px;
          b {
            transform: translateX(-50%) rotate(0deg) scale(1);
          }
        }
        sub {
          b {
            transform: translateX(-50%) rotate(360deg) scale(0);
          }
          span {
            transform: scaleY(-1) translateY(-7.5px);
          }
        }
      }
    }
    h1 {
      position: absolute;
      width: 100%;
      text-align: center;
      top: 50%;
      transform: translateY(-50%);
      margin: 0px;
      font-size: 80px;
      color: #fff;
      &:before, &:after{
        content:"lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod lorem ipsum dolor sit amet";
        display:inline-block;
        position:absolute;
        width:100vw;
        text-align:right;
        right:190px;
        font-size:80px;
        margin:0;
        top:-40px;
        min-width:10000px;
        opacity:0.15;
      }
      &:after{
        right:auto;
        left:190px;
        text-align:left;
      }
      sub,
      sup {
        position: absolute;
        top: 35px;
        left: 50%;
        transform: translateX(-50%);
        transition: 0.2s ease-in-out;
        b {
          position: absolute;
          transform: translateX(-50%) rotate(0deg) scale(1);
          left: 50%;
          top: -60px;
          transition: 0.3s ease-in-out;
        }
        span {
          display: inline-block;
          transition: 0.2s ease-in-out;
        }
      }
      sup {
        b {
          top: 75px;
          transform: translateX(-50%) rotate(360deg) scale(0);
        }
        span {
          opacity: 0;
        }
      }
    }
  }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.