Sẽ mở trong thẻ mới

Miễn phí vận chuyển cho đơn hàng đủ điều kiện

function updateHeaderHeight() {
        // Get the height of #brx-header
        const headerHeight = document.querySelector('#brx-header').offsetHeight;
          
        // Store the height in the CSS custom property --header-height
        document.documentElement.style.setProperty('--brxw-header-height', headerHeight + 'px');
    }

    // Execute the function as soon as the document is ready
    document.addEventListener('DOMContentLoaded', function() {
        updateHeaderHeight();  // Initial update of header height when the document is ready

        // Update the header height on window resize and orientation change
        window.addEventListener('resize', updateHeaderHeight);
        window.addEventListener('orientationchange', updateHeaderHeight);
});

TẠP CHÍ VINIRA

Phong cách & cảm hứng

Cảm hứng phối đồ, layering và phong cách nữ tính trong cuộc sống hiện đại.

Bài viết mới nhất

Những bài viết mới đang được VINIRA chuẩn bị. Nàng có thể khám phá các chủ đề ở phía trên.