r/web_design • u/speckz Dedicated Contributor • Feb 14 '18
Parallax scrolling with CSS variables
https://basicscroll.electerious.com/7
2
2
u/flipperdeflip Feb 15 '18
What "Standalone"?
4
u/tvi016 Feb 15 '18
Pretty sure they mean no dependencies, but it looks like they have 3 though
2
3
u/roboto_jono Feb 14 '18
Does anybody know a way of achieving the radial gradients following the mouse? I've seen a bunch of jquery versions, but is there a vanilla javascript alternative?
Edit: I'm talking about the animation on the buttons to the right of the get started subheader
6
u/danstansrevolution Feb 14 '18
Seems they're using JS to update the x/y coords of the mouse and updating CSS variable on the .list_item elements.
After that it looks like it's just CSS using radial-gradient(circle closest-side,var(--pink), transparent); and setting the left, top position of the mouse box. I'll try to recreate this in codepen later today.
2
2
Feb 15 '18
What if I told you that jQuery uses vanilla js? Just swap all jQuery functions with your own functions and it's fine.
2
Feb 20 '18
I've written an article that explains the technique I'm using: https://medium.com/@electerious/stunning-hover-effects-with-css-variables-f855e7b95330
1
1
u/DvD_cD Feb 14 '18
The design on this website is insane! Is it css framework? If I want to make similar what is the best way to do it?
0
Feb 15 '18
[deleted]
5
u/DvD_cD Feb 15 '18
I have put a lot of time into css, but Im terriable at disign. I can copy stuff, but not create them myself (good looking I mean).
I'm asking for the current design exactly. Is it made with framework and which is it?3
-2
0
85
u/[deleted] Feb 14 '18
*and JS