Created
November 5, 2012 19:24
-
-
Save bdalziel/4019773 to your computer and use it in GitHub Desktop.
Gallery Slide CSS
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
.gallerySlide { | |
display: inline-block; | |
float: left; | |
position: relative; | |
vertical-align: top; | |
/* Calculated via LESS based on parent .gallerySlides max capacity width | |
* 5000% = 50 slides. 1 slide width = (100%/50) = 2% | |
*/ | |
width: 2%; | |
margin-right: -0.3%; /* Similarly relative to parent. Represents a 15% margin to accommodate the peek */ | |
max-height: 100%; | |
height: 100%; | |
line-height: 0; | |
white-space: normal; /* Revert to normal white-space for children */ | |
opacity: 0.5; /* Peek faded out */ | |
} | |
.gallerySlide.selected { | |
/* Active slide */ | |
opacity: 1; | |
z-index: 10; /* Make sure active slide is infront of peek */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment