简体   繁体   English

滚动时淡出文本

[英]Fade text out when scrolling

Basically what I have is a page with a background image and when I have content which is quite long and overflows. 基本上,我的页面是带有背景图像的页面,当我的内容很长且溢出时。 I want the text to be inside that image and it appears to fade out when scrolling at the end of the image and the top of the image. 我希望文本在该图像内,并且在图像末尾和图像顶部滚动时,它似乎淡出。 I do not want internal scrollbars. 我不需要内部滚动条。 The background image itself is fixed and centered and I want the text to always remain inside there. 背景图像本身固定且居中,我希望文本始终保留在其中。

Is this possible? 这可能吗? if this is not clear then I will try and explain myself further. 如果不清楚,那么我将尝试进一步解释自己。

I have looked at options in Jquery and CSS fading but cannot find exactly what i want. 我已经看过Jquery和CSS褪色中的选项,但是找不到我想要的。

Any help is appreciated! 任何帮助表示赞赏!

Thanks 谢谢

H H

我建议您在div的顶部和底部植入图像叠加层(白色到透明),但是由于您的背景而可能无法正常工作……我们也许可以看到您使用的背景吗?

The two images Nexxeus says should be placed in a fixed position at the top and bottom of the browser. Nexxeus所说的两个图像应该放在浏览器顶部和底部的固定位置。 You shouldn't touch what the overflow does, since it will be hidden below the two images. 您不应该触摸溢出的作用,因为它将隐藏在两个图像的下面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM