Last active
December 21, 2015 07:29
-
-
Save stansidel/6271776 to your computer and use it in GitHub Desktop.
Reversing z-index based from page render order
http://stackoverflow.com/a/7033617/758990
This file contains hidden or 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
#nav ul li { | |
@for $i from 1 through 20 { | |
&:nth-child(#{$i}) { | |
z-index: 1000 - $i | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
z-index can be negative... Why not just z-index: -$i