很遗憾,之前类似问题的答案并没有帮助我解决问题。
我设法结合一些CSS样式在幻灯片顶部显示图像标题,我应该如何完成代码以使当前幻灯片编号和幻灯片总数以类似方式显示?
CSS
.inline { display: none }
.featherlight .legend {
position: absolute;
bottom: 0;
font-size: larger;
color: white;
}
脚本
$('a.gallery').featherlightGallery({
galleryFadeIn: 100, /* fadeIn speed when slide is loaded
galleryFadeOut: 300, /* fadeOut speed before slide is loaded */
closeIcon: '✕',
afterContent: function() {
this.$legend = this.$legend || $('<div class="legend"/>').insertAfter(this.$content);
this.$legend.text(this.$currentTarget.attr('alt'));
}
});