需要背景图片滚动但与固定左栏和液体右栏冲突

发布于 2024-12-18 17:29:00 字数 223 浏览 5 评论 0原文

这是布局

http://timsegreto.com/cssmock/mock.html

我需要背景图像与右列中的文本块一致地滚动。 我尝试了很多不同的方法但没有成功。 任何想法将不胜感激。 不确定是否可能或需要研究什么才能使其发挥作用。

谢谢!

here is the layout

http://timsegreto.com/cssmock/mock.html

i need the background image to scroll concordant with the text block in the right column.
ive tried many different ways with no success.
any ideas would greatly appreciated.
not sure if its possible or what t research to make it work.

thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

沉默的熊 2024-12-25 17:29:00

在我看来,您已将位置固定在错误的元素上。尝试固定 #framecontent 位置并将其从 #maincontent 中删除。

编辑 这是“怪癖”模式导致 IE 出现问题。去掉

<!--Force IE6 into quirks mode with this comment tag-->

html 开头的:。我确信这应该可以解决其他跨浏览器问题,但它破坏了固定定位。

It seems to me that you have fixed positioning on the wrong element. Try making #framecontent position fixed and remove it from #maincontent.

EDIT It's 'quirks' mode that's causing you IE issues. Get rid of the:

<!--Force IE6 into quirks mode with this comment tag-->

from the beginning of your html. I'm sure this is supposed to be solving other cross-browser issues but it's ruining fixed positioning.

我的奇迹 2024-12-25 17:29:00

您是否添加了一个额外的 div 并将背景图像设置在其上而不是主体上?您绝对可以将这个额外的 div 放置在带有 top: 0 的主体中 - 它会随着页面滚动然后...

不确定这是否正是您正在寻找的...

Have you adding an extra div and setting the background image on that instead of on the body? You could absolutely position this extra div in the body with top: 0 - it would scroll with the page then...

not sure if thats what you're looking for exactly...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文