English 中文(简体)
我有一个关于焦点、z索引以及它们与滚动的关系的问题
原标题:I have a question about focus, z-index, and their relation to scrolling

访问此处获取示例:www.davepoyzer.com

我的问题是,顶部div(#topheader)位于滚动div(#content)的上方(通过z-index)。如果你试着在光标位于#topheader上时用鼠标滚动,它不会滚动它下面的#content。他们会用javascript解决这个问题吗(页面已经完全依赖javascript了)?我一直在想改变注意力可能会做到这一点,但我对注意力不是很了解。

这是个主意,但我不知道是否可能。基本上,当鼠标在一个div(#topheader)上滚动时,它将被javascript捕获并滚动另一个div。这可能吗?

由于几个不同的因素,当前的CSS是原样的。我真的不认为更改CSS是可行的。例如,如果你把#topheader放在#content下面,你就不能点击导航链接。

任何想法或建议都会很棒!感谢阅读!

问题回答

I guess you could bind code to the scroll event of the header and the code will scroll the content div. Here is a jQuery reference. http://api.jquery.com/scroll/





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签