Header changes as you scroll down (jQuery)

后端 未结 7 1508
滥情空心
滥情空心 2020-12-01 01:22

TechCrunch recently redesigned their site and they have a sweet header that minifies into a thinner version of their branding as you scroll down.

You can see what I

7条回答
  •  不思量自难忘°
    2020-12-01 02:13

    Although the answers before seem a perfect solution, it appears that TechCrunch use z-index and fixed positioning to make this scroll effect.

    Desmond on Imageshack

    As you can see from the image above, both the large and small header are both on the screen and this wouldn't happen without tweaking the jQuery scroll event.

提交回复
热议问题