style:顶部宽度修改

This commit is contained in:
迷和油
2025-06-20 13:56:59 +08:00
parent 1fec0dcc42
commit 7380fb16d7

View File

@@ -107,5 +107,16 @@
$('.top-country .close-icon').click(function(){ $('.top-country .close-icon').click(function(){
$(".mask,.action-sheet").hide(); $(".mask,.action-sheet").hide();
}) })
// 移动端顶部宽度设置和主体内容宽度一致
var pageWidth = $('.oricoEGapp').outerWidth();
// 设置.header-PC元素的宽度
$('.oircoEgapp-head').css('width', pageWidth + 'px');
// 可选:监听窗口大小变化,实时更新宽度
$(window).resize(function() {
var newWidth = $('.oricoEGapp').outerWidth();
$('.oircoEgapp-head').css('width', newWidth + 'px');
});
}) })
</script> </script>