Affix and stack elements on scroll.
Code and Demo
Because Codepen shows the demo in an iframe, the postion:fixed doesn't work on iOS. As a result, Twitter Bootstrap's navbar won't stick to the top of the screen. So, if you're on an iPhone or iPad you can check it out here in fullscreen.
See the Pen Affix and stack elements at the top of the screen on scroll. by Nico Haemhouts (@nicohaemhouts) on CodePen.