How do these birds pop up behind the trees on the bottom?
http://grabaperch.com/about
Are they开发者_开发问答 using css with php or what is it?
They use jQuery:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
They have some JavaScript code in perch.js that animates the birds and the trees.
They are using jQuery to animate the birds and trees. There is an animate function that pops the birds out from behind the trees - adjusting the z-index will properly layer elements in that fashion.
jQuery
.animate
http://api.jquery.com/animate/
The reason it's behind is z-index
It is javascript, the code is here
精彩评论