Created
June 18, 2013 15:28
-
-
Save LibertysYarn/5806343 to your computer and use it in GitHub Desktop.
Animated Circular Image Gallery - Josh Johnson
A full tutorial for this project can be found on - http://designshack.net/articles/css/circlegallery/ - Design Shack.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
margin: 0; | |
padding: 0; | |
-webkit-backface-visibility: hidden; | |
} | |
body { | |
background: #222; | |
} | |
#header { | |
text-align: center; | |
height: 30px; | |
background: #444; | |
} | |
#header a { | |
color: #fff; | |
font: 100 14px/30px Helvetica, Verdana, sans-serif; | |
} | |
#header a:hover { | |
color: #c2e9fa; | |
} | |
/*SWITCHER*/ | |
.switcher { | |
margin-top: 40px; | |
} | |
.switcher ul { | |
margin: 0 auto; | |
width: 270px; | |
height: 20px; | |
font: 100 14px/20px Helvetica, Verdana, sans-serif; | |
} | |
.switcher li a { | |
color: white; | |
float: left; | |
margin: 0px 20px; | |
text-align: center; | |
text-decoration: none; | |
} | |
.switcher ul a:hover { | |
text-decoration: underline; | |
} | |
/*GALLERY*/ | |
.gallery { | |
width: 1000px; | |
margin: 50px auto; | |
} | |
ul { | |
list-style: none; | |
} | |
.gallery li { | |
height: 200px; | |
width: 200px; | |
margin: 25px; | |
float: left; | |
overflow: hidden; | |
-webkit-border-radius: 50%; | |
-moz-border-radius: 50%; | |
border-radius: 50%; | |
} | |
.gallery li img { | |
margin: -70px 0px 0px 0px; | |
z-index: -1; | |
-webkit-transition: margin 1.5s ease; | |
-moz-transition: margin 1.5s ease; | |
-o-transition: margin 1.5s ease; | |
-ms-transition: margin 1.5s ease; | |
transition: margin 1.5s ease; | |
} | |
.gallery li:hover img { | |
margin-left: -150px; | |
margin-top: -150px; | |
cursor: pointer; | |
} | |
.gallery li p { | |
width: 100px; | |
padding: 20px; | |
position: relative; | |
left: 15%; | |
top: 110%; | |
z-index: 1; | |
color: white; | |
text-align: center; | |
text-transform: uppercase; | |
font: bold 18px/1 Helvetica, Verdana, sans-serif; | |
text-shadow: 2px 2px 2px rgba(0,0,0,0.5); | |
-webkit-transition: top 0.5s ease; | |
-moz-transition: top 0.5s ease; | |
-o-transition: top 0.5s ease; | |
-ms-transition: top 0.5s ease; | |
transition: top 0.5s ease; | |
} | |
.gallery li:hover p { | |
top: 75%; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
margin: 0; | |
padding: 0; | |
-webkit-backface-visibility: hidden; | |
} | |
body { | |
background: #222; | |
} | |
#header { | |
text-align: center; | |
height: 30px; | |
background: #444; | |
} | |
#header a { | |
color: #fff; | |
font: 100 14px/30px Helvetica, Verdana, sans-serif; | |
} | |
#header a:hover { | |
color: #c2e9fa; | |
} | |
/*SWITCHER*/ | |
.switcher { | |
margin-top: 40px; | |
} | |
.switcher ul { | |
margin: 0 auto; | |
width: 270px; | |
height: 20px; | |
font: 100 14px/20px Helvetica, Verdana, sans-serif; | |
} | |
.switcher li a { | |
color: white; | |
float: left; | |
margin: 0px 20px; | |
text-align: center; | |
text-decoration: none; | |
} | |
.switcher ul a:hover { | |
text-decoration: underline; | |
} | |
/*GALLERY*/ | |
.gallery { | |
width: 1000px; | |
margin: 50px auto; | |
} | |
ul { | |
list-style: none; | |
} | |
.gallery li { | |
height: 200px; | |
width: 200px; | |
margin: 25px; | |
float: left; | |
overflow: hidden; | |
-webkit-border-radius: 50%; | |
-moz-border-radius: 50%; | |
border-radius: 50%; | |
} | |
.gallery li img { | |
margin: -60px 0px; | |
width: 210px; | |
height: 210px; | |
z-index: -1; | |
-webkit-transition: all 1.5s ease; | |
-moz-transition: all 1.5s ease; | |
-o-transition: all 1.5s ease; | |
-ms-transition: all 1.5s ease; | |
transition: all 1.5s ease; | |
} | |
.gallery li:hover img { | |
width: 400px; | |
height: 400px; | |
cursor: pointer; | |
} | |
.gallery li p { | |
width: 100px; | |
padding: 20px; | |
position: relative; | |
left: 15%; | |
top: 110%; | |
z-index: 1; | |
color: white; | |
text-align: center; | |
text-transform: uppercase; | |
font: bold 18px/1 Helvetica, Verdana, sans-serif; | |
text-shadow: 2px 2px 2px rgba(0,0,0,0.5); | |
-webkit-transition: top 0.5s ease; | |
-moz-transition: top 0.5s ease; | |
-o-transition: top 0.5s ease; | |
-ms-transition: top 0.5s ease; | |
transition: top 0.5s ease; | |
} | |
.gallery li:hover p { | |
top: 75%; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
margin: 0; | |
padding: 0; | |
-webkit-backface-visibility: hidden; | |
} | |
body { | |
background: #222; | |
} | |
#header { | |
text-align: center; | |
height: 30px; | |
background: #444; | |
} | |
#header a { | |
color: #fff; | |
font: 100 14px/30px Helvetica, Verdana, sans-serif; | |
} | |
#header a:hover { | |
color: #c2e9fa; | |
} | |
/*SWITCHER*/ | |
.switcher { | |
margin-top: 40px; | |
} | |
.switcher ul { | |
margin: 0 auto; | |
width: 270px; | |
height: 20px; | |
font: 100 14px/20px Helvetica, Verdana, sans-serif; | |
} | |
.switcher li a { | |
color: white; | |
float: left; | |
margin: 0px 20px; | |
text-align: center; | |
text-decoration: none; | |
} | |
.switcher ul a:hover { | |
text-decoration: underline; | |
} | |
/*GALLERY*/ | |
.gallery { | |
width: 1000px; | |
margin: 50px auto; | |
} | |
ul { | |
list-style: none; | |
} | |
.gallery li { | |
height: 200px; | |
width: 200px; | |
margin: 25px; | |
float: left; | |
overflow: hidden; | |
-webkit-border-radius: 50%; | |
-moz-border-radius: 50%; | |
border-radius: 50%; | |
} | |
.gallery li img { | |
margin: -60px 0px; | |
width: 400px; | |
height: 400px; | |
z-index: -1; | |
-webkit-transition: all 1.5s ease; | |
-moz-transition: all 1.5s ease; | |
-o-transition: all 1.5s ease; | |
-ms-transition: all 1.5s ease; | |
transition: all 1.5s ease; | |
} | |
.gallery li:hover img { | |
width: 210px; | |
height: 210px; | |
cursor: pointer; | |
} | |
.gallery li p { | |
width: 100px; | |
padding: 20px; | |
position: relative; | |
left: 15%; | |
top: 110%; | |
z-index: 1; | |
color: white; | |
text-align: center; | |
text-transform: uppercase; | |
font: bold 18px/1 Helvetica, Verdana, sans-serif; | |
text-shadow: 2px 2px 2px rgba(0,0,0,0.5); | |
-webkit-transition: top 0.5s ease; | |
-moz-transition: top 0.5s ease; | |
-o-transition: top 0.5s ease; | |
-ms-transition: top 0.5s ease; | |
transition: top 0.5s ease; | |
} | |
.gallery li:hover p { | |
top: 75%; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment