<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="container">
<ul class="gallery-wrapper">
<li>
<a href="#image-1">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/alarm%20politie.jpg">
</a>
</li>
<li>
<a href="#image-2">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/flowers.jpg">
</a>
</li>
<li>
<a href="#image-3">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/her%20camera.jpg">
</a>
</li>
<li>
<a href="#image-4">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/little%20fox.jpg">
</a>
</li>
<li>
<a href="#image-5">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/map.jpg">
</a>
</li>
<li>
<a href="#image-6">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/ship.jpg">
</a>
</li>
<li>
<a href="#image-7">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/snow%20mountain.jpg">
</a>
</li>
<li>
<a href="#image-8">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/ship%20and%20shepherd.jpg">
</a>
</li>
</ul>
<div class="hidden-images-wrapper">
<div id="image-1">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/alarm%20politie.jpg">
<a class="img-prev" href="#image-8">PREV</a>
<a class="img-next" href="#image-2">NEXT</a>
<a class="img-close" href="#"></a>
</div>
<div id="image-2">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/flowers.jpg">
<a class="img-prev" href="#image-1">PREV</a>
<a class="img-next" href="#image-3">NEXT</a>
<a class="img-close" href="#"></a>
</div>
<div id="image-3">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/her%20camera.jpg">
<a class="img-prev" href="#image-2">PREV</a>
<a class="img-next" href="#image-4">NEXT</a>
<a class="img-close" href="#"></a>
</div>
<div id="image-4">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/little%20fox.jpg">
<a class="img-prev" href="#image-3">PREV</a>
<a class="img-next" href="#image-5">NEXT</a>
<a class="img-close" href="#"></a>
</div>
<div id="image-5">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/map.jpg">
<a class="img-prev" href="#image-4">PREV</a>
<a class="img-next" href="#image-6">NEXT</a>
<a class="img-close" href="#"></a>
</div>
<div id="image-6">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/ship.jpg">
<a class="img-prev" href="#image-5">PREV</a>
<a class="img-next" href="#image-7">NEXT</a>
<a class="img-close" href="#"></a>
</div>
<div id="image-7">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/snow%20mountain.jpg">
<a class="img-prev" href="#image-6">PREV</a>
<a class="img-next" href="#image-8">NEXT</a>
<a class="img-close" href="#"></a>
</div>
<div id="image-8">
<img src="http://7rf38t.com1.z0.glb.clouddn.com/ship%20and%20shepherd.jpg">
<a class="img-prev" href="#image-7">PREV</a>
<a class="img-next" href="#image-1">NEXT</a>
<a class="img-close" href="#"></a>
</div>
</div>
</div>
</body>
</html>
html,body{
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #f0f0f0;
}
.gallery-wrapper{
display: block;
list-style: none;
width: 800px;
height: 400px;
margin: 60px auto 0 auto;
padding: 10px;
background-color: #fff;
}
.gallery-wrapper li{
display: block;
float: left;
list-style: none;
width: 180px;
height: 180px;
padding: 10px;
}
.gallery-wrapper a{
display: block;
width: 180px;
height: 180px;
overflow: hidden;
}
.gallery-wrapper img{
display: block;
width: 180px;
height: 180px;
object-fit: cover;
background-color: #eee;
transition: .5s;
}
.gallery-wrapper a:hover img{
transform: scale(1.1);
}
.hidden-images-wrapper > div{
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0,0,0,.8);
opacity: 0;
transition: .6s;
pointer-events: none;
}
.hidden-images-wrapper > div:target{
opacity: 1;
pointer-events: auto;
}
.hidden-images-wrapper img{
display: block;
position: absolute;
z-index: 3;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 740px;
height: 500px;
max-width: 90%;
max-height: 90%;
margin: auto;
padding: 30px;
background-color: #fff;
border-radius: 5px;
object-fit: contain;
transition: .7s;
}
.img-prev,
.img-next{
display: block;
position: absolute;
z-index: 4;
top: 0;
bottom: 0;
height: 50px;
margin: auto 0;
padding: 0 20px;
color: #333;
font-size: 16px;
line-height: 50px;
text-decoration: none;
background-color: #fff;
}
.img-prev:hover,
.img-next:hover{
background-color: #eee;
}
.img-prev{
left: 0;
border-radius: 0 5px 5px 0;
}
.img-next{
right: 0;
border-radius: 5px 0 0 5px;
}
.img-close{
position: absolute;
z-index: 2;
top: 0;
right: 0;
bottom: 0;
left: 0;
cursor: default;
}
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |