I understand how to show/hide DIV but how did they make this footer?
I would love this on my website.
Please take a look开发者_如何学C at this page it's Constant Contact by the way, notice the footer.
Constant Contact Thanks!
Here is a very simplistic version of how to achieve something similar to your example. You only need to use JavaScript if you're using a browser < IE7, otherwise simple CSS can do it.
Live Demo
#footer{
bottom: 0px;
position: fixed;
}
Give the div a fixed position. something like this:
<div style="width:100%; position:fixed; bottom:0px; background-color:blue; height: 50px;">
Excellent footer content here
</div>
Looks like they used jQuery to animate the div that contains all the footer content.
The relevant .js file is here: http://www.constantcontact.com/_script/social-media-toolbar.js?version=1307033023000
精彩评论