jQuery Mobile: Stick footer to bottom of page

后端 未结 10 914
一个人的身影
一个人的身影 2020-12-04 09:40

Is there any way, bearing in mind the way the jQuery Mobile framework operates, to fix the page so that the footer always aligns with the bottom of the page - no matter the

10条回答
  •  南笙
    南笙 (楼主)
    2020-12-04 10:30

    The following lines work just fine...

    var headerHeight = $( '#header' ).height();
    var footerHeight = $( '#footer' ).height();
    var footerTop = $( '#footer' ).offset().top;
    var height = ( footerTop - ( headerHeight + footerHeight ) );
    $( '#content' ).height( height );
    

提交回复
热议问题