feat:样式bug移动端修改

This commit is contained in:
2025-06-24 17:51:29 +08:00
parent 80dbc75c73
commit 35329b25e8
10 changed files with 75 additions and 11 deletions

View File

@@ -310,6 +310,16 @@
icon.removeClass('icon-jian-svg').addClass('icon-add-svg');
}
});
// 判断年份
// 计算.timeline下的li元素数量
var liCount = $('.timeline ol li').length;
// 如果有li元素则设置a标签的宽度
if (liCount > 0) {
var widthPerItem = (100 / liCount-0.3) + '%';
$('.timeline ol li a').css('width', widthPerItem);
}
});
</script>
{/block}