What is the simplest jQuery way to have a 'position:fixed' (always at top) div?

后端 未结 6 560
醉梦人生
醉梦人生 2020-11-28 20:39

I\'m relatively new to jQuery, but so far what I\'ve seen I like. What I want is for a div (or any element) to be across the top of the page as if \"position: fixed\" worked

6条回答
  •  感情败类
    2020-11-28 21:12

    For anyone still looking for an easy solution in IE 6. I created a plugin that handles the IE 6 position: fixed problem and is very easy to use: http://www.fixedie.com/

    I wrote it in an attempt to mimic the simplicity of belatedpng, where the only changes necessary are adding the script and invoking it.

提交回复
热议问题