Skip to content

Instantly share code, notes, and snippets.

Created November 8, 2012 10:05
Show Gist options
  • Save anonymous/4037916 to your computer and use it in GitHub Desktop.
Save anonymous/4037916 to your computer and use it in GitHub Desktop.
Untitled
body {
background: #fff;
margin:0;
}
section{
display: block;
width: 550px;
position:relative;
overflow: hidden;
}
ul {
z-index:10;
position:absolute;
height: 400px;
width: 90px;
background: #ccc;
padding: 10px;
margin:0;
}
li{list-style:none;}
ul::after {
content: ' ';
width: 30px;
height: 420px;
position: absolute;
top:0;
right: -30px;
background: -webkit-linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0));
background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}
#show{
position: absolute;
width: 250px;
left: -600px;
transition: 1s;
}
#show:target {
left: 140px;
}
<!-- content to be placed inside <body>…</body> -->
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<ul>
<li><a href="#show">Show</a>
<li><a href="#hide">Hide</a>
</ul>
<div id="show">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
</body>
</html>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment