Fade text on scroll
-
Hi,
I have a text element fixed to a centre position on my project pages. I'd like to make this fade out as the users scrolls down the page.
http://pc2021.wpengine.com/blood-sweat-tears
I'm using this CSS code to fixed the text and adding the HTML class "_floating_text" the grider row:
._floating_text { position: fixed; width: 100%; top: 50%; left: 50%; margin-right: -50%; transform: translate(-50%, -50%); z-index: -1; }
Text works fine with this, but I've no idea how to make it fade as the user scrolls? Any ideas / help would be much appreciated.
Thanks, Paul.
-
@paulcalver try some jQuery like in this example:
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com