开发者

How can I hide text in this jquery slider?

I'm using this slider: http://tutorialzine.com/2009/11/beautiful-apple-gallery-slideshow/ and just want to add some text to each image so I added a div with text inside like this:

        <div class="slide">
    <div class="innerText">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure 
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br/>
    <a href="#">More info</a&g开发者_Go百科t;
    </div>
    <img src="assets/img/e.jpg" alt="Anything_Scissors_turquoise" width="920" height="650" /></div>

But the text appears in every slide even if the slide isn't visible (it just appears floating to the right doesn't respect the overflow:hidden; property). How can I get it to hide? I've been trying to modify the css and the jquery but I just end up breaking the jquery or not showing any text at all. =/


Add position:relative; to the div.slide, and add position:absolute; to the div.innerText in CSS. That should fix the problem.

Edit: Actually, I tried modifying the original sample code. Simply adding another div with text into div.slide worked perfectly. Could you post your own real code, seems like you have missed something.


Add CSS style position:relative; to the div.slide Then apply style to innerText

How can I hide text in this jquery slider?

It is not recommended. But, we can get the output.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜