javascript - Position text above fixed text with CSS -
is possible can keep heading
above some other area
text @ times - when user begins scrolling page?
how do css/jquery?
demo: http://jsfiddle.net/h49p65qa/
css:
* { margin: 0; padding: 0; } .site-wrap { padding:40px 0 } .some-other-area { } h1 { position:fixed; z-index:1; top:0; margin:0; } h2 { padding: 0px; margin: 0px 0 20px 0; } .floatingheader { position: fixed; top: 0; visibility: hidden; }
thank you
is looking for?
js:
var el = $(this), offset = el.offset(), scrolltop = $(window).scrolltop() + 50, floatingheader = $(".floatingheader", this)
css:
.floatingheader { position: fixed; top: 50px; visibility: hidden; }
Comments
Post a Comment