style:category 和产品详情和详情样式调整

This commit is contained in:
2025-05-12 15:37:24 +08:00
parent fd60e4b334
commit dfcf9ae957
7 changed files with 49 additions and 10 deletions

View File

@@ -101,6 +101,25 @@
}
})
})
// 滚动到猜你喜欢部分,右边提交信息不固定
$(window).scroll(function() {
// 获取元素引用
const blogContent = $('.blog_content');
const rightSidebar = $('.orico_Page_articleDetail .articleDetailMain .atmright');
// 计算 blog_content 底部位置
const contentBottom = blogContent.offset().top + blogContent.outerHeight();
// 计算视口底部位置
const windowBottom = $(window).scrollTop() + $(window).height();
// 当视口底部超过 blog_content 底部时
if (windowBottom >= contentBottom) {
rightSidebar.css('position', 'static'); // 移除固定定位
} else {
rightSidebar.css('position', 'fixed'); // 恢复固定定位
}
});
})
function shareCustomers(){
// 复制到粘贴板