Created
March 8, 2012 18:13
-
-
Save srobbin/2002441 to your computer and use it in GitHub Desktop.
Approach Demo: Opacity
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
<!-- | |
In this demo, there are a series of circular images. | |
Their opacity changes as you approach each individual one. | |
--> | |
<!-- Beginning styles --> | |
<style> | |
img.circle { | |
float: left; | |
height: 80px; | |
width: 80px; | |
opacity: 0.2; | |
filter: alpha(opacity=20); | |
zoom: 1; | |
z-index: 0; | |
} | |
</style> | |
<!-- The elements (there are 40 of them) --> | |
<img class="circle" src="http://farm3.static.flickr.com/2526/4011568848_ff5aeeefb8_o.jpg" /> | |
<!-- | |
Approach | |
Note: jQuery is already included in this page. | |
--> | |
<script> | |
$("img.circle").approach({ | |
opacity: 0.8 | |
}, 100); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment