Any idea how to make such a thing as seen here http://studiompls.com/case-studies/crown-maple/
Header goes smaller and logo changes to different button. Can it be done with CSS without writing any JS?
Cheers!
Update:
if JS is a must, any link you can recommend to learn? Thanks.
Here is whole tutorial on that effect and I don't think it is possible to do it without js 'cause you need to checking on scroll, and do toggleClass with jQueryUI for example or something :)
hope it helps ;)
Cheers
Easy use jquery:
Make sure you have a js file though
You can do it with jquery. It's pretty easy.
Here's a demo: http://jsfiddle.net/jezzipin/JJ8Jc/
Since you need to style the inner element of navigation it will be better to add class on navigation to style inner items
and js
and finally css
here is the link
I made a fiddle that only uses CSS, no Javascript, to achieve roughly the same effect: the header grows smaller when you scroll down past the first section, and its icon changes. And of course when you scroll back up, the header grows again and gets its old icon back. Done with nothing more esoteric than a couple of
:hover
s (and a transition, but that's just icing; it works on non-transition-aware browsers).This may not be exactly what you are after, but you can use it as a fallback in case the user has Javascript switched off.