问题
I have a strange bug that recently started happening in Chrome (works fine in IE, FF and even Safari). This was working a few weeks ago, so I am assuming this is a bug that came about in a recent Chrome build.
Basically I have flash fixed "behind" the page, and I have an overlay fixed above the page (controls for video).
I know Chrome 22 included separate stacking contexts for fixed elements, but this was working a few weeks ago and we are on Chrome 27 now, so that does not seem to be relevant. I have a zindex on both elements too.
Any ideas?
Edit: I forgot to mention the overlay is in the correct place, and it is clickable, it is just not visible in the correct place when you scroll.
回答1:
I believe this is a bug/regression in Chrome and have submitted a bug report (249235).
A workaround is to force the layer to be rendered on the GPU with -webkit-transform: translateZ(0);
(targeted only to Chrome).
来源:https://stackoverflow.com/questions/17079857/position-fixed-broken-in-chrome-with-flash-behind