The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Sticky nav background color change on anchor
I am trying to replicate the effect seen here, http://livearealabs.com/work/sees-candies whereby the top sticky nav changes colors dependent on which section its on. I see the developer here is using transform-y percentages, but relative to what?
Whenever you see inline CSS like that…assume JS.
I see the developer here is using transform-y percentages, but relative to what?
With a transform, that is relative to the element itself. So 100% is it’s own height.
Can I get a mod to move post to the JS forum? Still wonder how this is being done.