简体   繁体   English

javaScript / HTML-带bxslider的字幕

[英]javaScript/HTML -Captions with bxslider

I am using the bxslider as my template. 我正在使用bxslider作为模板。 i have to display in each picture a caption at the bottom of the picture. 我必须在每张图片的底部显示一个标题。

<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>

How can I display the caption? 如何显示字幕?

http://bxslider.com/examples/image-slideshow-captions http://bxslider.com/examples/image-slideshow-captions

Just have to add the following attributes when the bxslider is called: 调用bxslider时只需添加以下属性:

 $('.bxslider').bxSlider({
            mode:'fade',
            captions: true
            });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM