I’m hoping other people will share their projects/mini projects so we can all pick up some hints and tips from various places.
I was messing around on Codepen trying to create the functionality I needed for part of my weather app and ended up creating this little compass spinner.
Wondering if anyone wants to double check the code and tell me if there’s a better way of doing any of it.
Also, I couldn’t get the slider to centralise without manually adjusting the padding - any ideas?
1 parent div, with 2 divs inside. The parent div has overflow: hidden and the inner divs have a height: 100%. On hover: set margin of first inner div to - (div height). So the whole div is pushed up, and the div beneath is also pushed up (automatically).
Cool compass. I’m actually making use of a similar technique in my weather app, but with a picture of a windsock instead. You can add some inertia bounce for flavour with transition: transform 1s cubic-bezier(.52,.52,.7,1.3); or something.