隐藏透明标题下的滚动内容

隐藏透明标题下的滚动内容

本文介绍了隐藏透明标题下的滚动内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我疯了寻找答案。这很简单,我知道它。



我的页面顶部有一个固定的透明页眉。当我滚动时,我希望正文内容在它下滚动,但不能通过标题div看到。我见过类似的帖子,但没有什么能帮助我解决我的问题。欣赏任何可能有帮助的提示或线索。

下面的例子:
thnki.com/hosting/sycamore

解决方案

您需要:


  • 制作一张与现在完全相同的非透明图片, li>
  • 为页面下部(直接在页眉之下/之后)创建一个div,该页面具有自己的溢出风格设置,这将导致滚动条仅为页面的一部分

  • ,或者只是享受您所获得的超棒的透明度叠加效果。



我喜欢它它实际上是

Alright, I've gone nuts looking for an answer. This is simple, I know it.

I have a fixed transparent header at the top of my page. When I scroll I want the body content to scroll under it but not be seen through the header div. I've seen similar posts but nothing that helps me with my case. Appreciate any hints or cues that could help out. Thanks!

Example below:thnki.com/hosting/sycamore

解决方案

You will either need to:

  • make a non transparent image that looks the same as it is now,
  • create a div for the lower part of the page (directly under/after the header) that has its own overflow style setting, which will cause the scrollbar to be only part of the page
  • or just enjoy that super awesome transparency-overlay effect you're getting.

i like it how it is actually

这篇关于隐藏透明标题下的滚动内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 08:41