Skip to content

Instantly share code, notes, and snippets.

@alimd
Created July 21, 2013 07:13
Show Gist options
  • Save alimd/6047794 to your computer and use it in GitHub Desktop.
Save alimd/6047794 to your computer and use it in GitHub Desktop.
body{
background-color: #DDD;
}
.accslide {
width: 600px;
height: 300px;
border: 1px solid black;
margin: 0 auto;
overflow: hidden;
}
.accslide > div{
height: inherit;
width: 1000px;
}
.accslide > div > div{
width: 150px;
height: inherit;
float: left;
-webkit-transition: all 0.6s;
}
.accslide > div > div:last-child{
padding-right: 200px;
}
.accslide:hover > div > div{
width: 60px;
}
.accslide > div > div:hover{
width: 420px;
-webkit-transition-duration: 0.5s;
}
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<section class="accslide">
<div>
<div style="background-color:hsl(10,80%,25%);"></div>
<div style="background-color:hsl(90,80%,25%);"></div>
<div style="background-color:hsl(300,80%,25%);"></div>
<div style="background-color:hsl(190,80%,25%);"></div>
</div>
</section>
</body>
</html>
@alimd
Copy link
Author

alimd commented Jul 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment