简体   繁体   中英

How to create a dynamic fixed div

I need your help, i want to create a dynamic fixed DIV That means it a fixed div but it cant override header (or other div's above it) and footer (or other div's below it). Example when scroll on top it below other div but when scroll down enough it will be in top, and when scroll to bottom of pages it stand above other div. I don't know the key for this div is, so i call it "dynamic fixed div".

An example here: http://www.1stwebdesigner.com/wp-content/uploads/2010/07/index.html . I want to create a div like as "Select category" div.

Thanks!

You can use the css property "position: fixed;" to do it, and with Jquery you can do some effects interesting.

So, look this tutorial, I believe it'll help you.

http://www.sutanaryan.com/jquery/how-to-create-fixed-menu-when-scrolling-page-with-css-and-jquery/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM