我使用bxslider作为我的模板。 我必须在每张图片中显示图片底部的标题。
<ul class="bxslider">
<pictures:each bean="${bean}" companyType="${companyType }" pictureList="${pictureList }">
<g:if test = "${picture.getLargeImageURL() != null && picture.getThumbnailImageURL() != null}">
<li>
<img style="height: 240px; width: 100%" src="${picture.getLargeImageURL()}" alt="${picture.copyright.copyrightify()}" title="${picture.caption.linkify()}"/>
</li>
</g:if>
<g:elseif test="${largeFileName != null && thumbnailFileName != null }">
<li>
<img src="${resource(dir:'imgService',file:largeFileName)}" style="height: 240px; width: 100%" alt="${picture.copyright.copyrightify()}" title="${picture.caption.linkify()}"/>
</li>
</g:elseif>
</pictures:each>
</ul>
如何显示标题?
答案 0 :(得分:0)
http://bxslider.com/examples/image-slideshow-captions
调用bxslider时只需添加以下属性:
$('.bxslider').bxSlider({
mode:'fade',
captions: true
});