Blogger Information
Blog 39
fans 0
comment 0
visits 34601
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
body高度小于浏览器高度
美丽城堡
Original
1119 people have browsed it
// 当body页面高度小于浏览窗口页面高度时,设置body页面为浏览窗口高度,foot 定位窗口底部
var body = $('body');
var vh100 = $('html').css('min-height','100vh').height();
var foot = $('.foot');
if(body.height() < vh100){
    body.height(vh100);
    foot.css({
        "position": "fixed",
        "bottom": 0,
        "left": 0,
        "width": "100vw"
    })
}


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post