nivo slider - add text to the slider

后端 未结 4 1588
名媛妹妹
名媛妹妹 2021-02-10 07:30

I am currently using the nivo slider on my homepage, to show different images. It works perfectly. Although, next to the images there are some text, which I would like to follow

4条回答
  •  你的背包
    2021-02-10 07:58

    Use title attribute in the to define text to appear as caption in the slider.


    Lets see an example:

    This is an example of a HTML caption with a link.

    Update

    Without hacking the code, you can override the default class to appear as a separate text box.

    Find .nivo-caption style and make some changes to it

    .nivo-caption { 
           width: 200px; 
           height: 250px; 
           left: -200px; /* same as the width */
     }
    

    Update 2

    Here is a demo with your slider working with the workaround i mentioned.

    SO far as this question goes, this is where i stop. Hope it helps.

提交回复
热议问题