详情页删除滚动条&解决排版混乱
1.需求描述
产品详情页滚动条过长,影响美观。
2.解决方案
在theme.scss.liquid
里搜索.Product__InfoWrapper
,然后删除下图中红框内的代码

然后为了解决产品详情页尾部添加图片后排版混乱,在product-template.liquid
里面搜索schema
,然后在下图所示位置添加
<script src="https://cdn.bootcss.com/jquery/1.11.1/jquery.js"></script>
<script>
$(function(){
var ele,ele2,Maxheight;
$(window).load(function(){
Maxheight=$(".Product").height();
ele= $(".Product__InfoWrapper").height();
Maxheight=Math.max(Maxheight,ele);
console.log(Maxheight)
$("#shopify-section-product-template").height(Maxheight+100)
setTimeout(function(){
ele2= $(".Product__Info").outerHeight();
console.log(ele,ele2)
if(Maxheight<ele2){
$("#shopify-section-product-template").height(ele2+100);
}
},2000)
})
});
</script>

3.效果图

文档维护:黎俊阳、王小榆、王星星、林颖