hover effect concept (diagonal slice)

In this example below you will see how to do a hover effect concept (diagonal slice) with some HTML / CSS and Javascript

diagonal slicing hover efffect

Thumbnail
This awesome code was written by , you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright ⁣ ©
  • HTML
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>hover effect concept (diagonal slice)</title>
  
  
  
  
  
</head>

<body>

  
<div class="grid">    
  <div class="pane #{className}">
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="text">
      <p>eastbound and down</p>
    </div>
  </div>
  <div class="pane #{className}">
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="text">
      <p>my name is earl</p>
    </div>
  </div>
  <div class="pane #{className}">
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="text">
      <p>wilfred</p>
    </div>
  </div>
  <div class="pane #{className}">
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="part"> 
      <div class="slice">
        <div class="img">
          <div class="bimg"></div>
        </div>
      </div>
    </div>
    <div class="text">
      <p>trailer park boys</p>
    </div>
  </div>
</div>
  
  

</body>

</html>

Comments