Created
December 23, 2011 04:17
-
-
Save dumaurier/1513124 to your computer and use it in GitHub Desktop.
CSS Filters!
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
/** | |
* CSS Filters! | |
*/ | |
img{ | |
margin:5px; | |
} | |
img:nth-of-type(1){ | |
-webkit-filter:grayscale(1); | |
-webkit-transition:all 1s ease-in-out; | |
} | |
img:nth-of-type(1):hover{ | |
-webkit-filter:grayscale(0); | |
} | |
img:nth-of-type(2){ | |
-webkit-filter:sepia(1); | |
-webkit-transition:all 1s ease-in-out; | |
} | |
img:nth-of-type(2):hover{ | |
-webkit-filter:sepia(0); | |
} | |
img:nth-of-type(3){ | |
-webkit-filter:saturate(200%); | |
-webkit-transition:all 1s ease-in-out; | |
} | |
img:nth-of-type(3):hover{ | |
-webkit-filter:saturate(100%); | |
} | |
img:nth-of-type(4){ | |
-webkit-filter:hue-rotate(180deg); | |
-webkit-transition:all 1s ease-in-out; | |
} | |
img:nth-of-type(4):hover{ | |
-webkit-filter:hue-rotate(0deg); | |
} | |
img:nth-of-type(5){ | |
-webkit-filter:invert(100%); | |
-webkit-transition:all 1s ease-in-out; | |
} | |
img:nth-of-type(5):hover{ | |
-webkit-filter:invert(0); | |
} | |
img:nth-of-type(6){ | |
-webkit-filter:opacity(30%); | |
-webkit-transition:all 1s ease-in-out; | |
} | |
img:nth-of-type(6):hover{ | |
-webkit-filter:opacity(100%); | |
} | |
img:nth-of-type(7){ | |
-webkit-filter:brightness(20%); | |
-webkit-transition:all 1s ease-in-out; | |
} | |
img:nth-of-type(7):hover{ | |
-webkit-filter:brightness(100%); | |
} | |
img:nth-of-type(8){ | |
-webkit-filter:contrast(50%); | |
-webkit-transition:all 1s ease-in-out; | |
} | |
img:nth-of-type(8):hover{ | |
-webkit-filter:contrast(100%); | |
} | |
img:nth-of-type(9){ | |
-webkit-filter:blur(5px); | |
-webkit-transition:all 1s ease-in-out; | |
} | |
img:nth-of-type(9):hover{ | |
-webkit-filter:blur(0px); | |
} | |
img:nth-of-type(10){ | |
-webkit-filter:drop-shadow(5px 10px 10px rgba(0,0,0,.9)); | |
-webkit-transition:all 1s ease-in-out; | |
} | |
img:nth-of-type(10):hover{ | |
-webkit-filter:drop-shadow(0px 0px 0px rgba(0,0,0,0)); | |
} |
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
<h1>CSS Filters</h1> | |
<h3>Hover for Original Image</h3> | |
<img src="http://lorempixel.com/300/200/nature/1/"> | |
<img src="http://lorempixel.com/300/200/nature/2/"> | |
<img src="http://lorempixel.com/300/200/nature/3/"> | |
<img src="http://lorempixel.com/300/200/nature/4/"> | |
<img src="http://lorempixel.com/300/200/nature/5/"> | |
<img src="http://lorempixel.com/300/200/nature/6/"> | |
<img src="http://lorempixel.com/300/200/nature/7/"> | |
<img src="http://lorempixel.com/300/200/nature/8/"> | |
<img src="http://lorempixel.com/300/200/sports/"> | |
<img src="http://lorempixel.com/300/200/nature/10/"> | |
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
{"view":"split","prefixfree":"1","page":"html"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment