Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
  
  body {
    color: #555;
    background: #eee;
  }
  h1 {
    font-family: sans-serif;
    font-size: 2em;
    margin: 20px 0 0 0;
    text-align: center;
  }
  
  h2 {
    font-family: sans-serif;
    font-size: 1.2em;
    text-align: center;
  }
  p {
    padding: 10px 0 0;
    color: #222;
    font-family: sans-serif;
    font-weight: bold;
    text-align: center;
  }
    
 .wrap {
    position: relative;
    height: 100%;
  }
  .clip {
    position: absolute;
    -webkit-transition: all 1s ease;
    z-index: 1;
  }
  
  .c1 {
    top: 100px;
    left: 0;
    clip: rect(140px, 300px, 200px, 250px);
  }
  
  .c2 {
    top: 250px;
    left: 300px;
    clip: rect(80px, 210px, 160px, 100px);
  }
  
  .c3 {
    top: 60px;
    left: 300px;
    clip: rect(110px, 160px, 170px, 60px);
  }
  
  .c4 {
    top: 100px;
    left: 600px;
    clip: rect(160px, 130px, 220px, 60px);
  }
  
  .c5 {
    top: 400px;
    left: 0px;
    clip: rect(60px, 250px, 130px, 180px);
  }
  
  .c6 {
    top: 400px;
    left: 400px;
    clip: rect(80px, 160px, 160px, 70px);
  }
 
  .clip:hover {
    clip: rect(0, 400px, 260px, 0);
    cursor: pointer;
    z-index: 999;
  }
</style>
</head>
<body>
  
  <h1>Hover Over The Images</h1>
  
  <h2>Demo gallery using CSS <code>clip</code> to show/hide images</h2>
  
  <div class="wrap">
    <figure class="clip c1">
      <img src="http://cdn.impressivewebs.com/2011-11/greece001.jpg" alt="" width="400" height="260">
    </figure>
    
    <figure class="clip c2">
      <img src="http://cdn.impressivewebs.com/2011-11/greece002.jpg" alt="" width="400" height="260">
    </figure>
    
    <figure class="clip c3">
      <img src="http://cdn.impressivewebs.com/2011-11/greece003.jpg" alt="" width="400" height="260">
    </figure>
    
    <figure class="clip c4">
      <img src="http://cdn.impressivewebs.com/2011-11/greece004.jpg" alt="" width="400" height="260">
    </figure>
    
    <figure class="clip c5">
      <img src="http://cdn.impressivewebs.com/2011-11/greece005.jpg" alt="" width="400" height="260">
    </figure>
    
    <figure class="clip c6">
      <img src="http://cdn.impressivewebs.com/2011-11/greece006.jpg" alt="" width="400" height="260">
    </figure>
   
  </div>
    
</body>
</html>
if (document.getElementById('hello')) {
  document.getElementById('hello').innerHTML = 'Hello World - this was inserted using JavaScript';
}
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers