adjustConentHeight.js 488 字节
Newer Older
B
BingBlog 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
const adjustConentHeight = function () {
    let elContentContainer = document.getElementById('content-container');
    let contentHeight = window.innerHeight - 140;
    elContentContainer.style.minHeight = contentHeight + 'px';
};

const resizeContentHeightWhenScroll = function () {
    window.addEventListener('resize', () => {
        adjustConentHeight();
    });
};

export const resizeContentHeight = function () {
    adjustConentHeight();
    resizeContentHeightWhenScroll();
};