0

I've got this in the index(this is only a small portion of it)

<article id="abms">
    <p>
        Mauris vulputate lorem ac nibh rhoncus, eu mattis lorem mattis. Maecenas metus dui, rhoncus eget erat quis, vehicula luctus justo. Aenean vel porta est, tristique mollis metus. Mauris gravida diam sit amet tellus pellentesque hendrerit. Maecenas ut suscipit metus. Nunc vel volutpat est, porta sodales nibh. Pellentesque varius ac massa nec varius.
        Mauris vulputate lorem ac nibh rhoncus, eu mattis lorem mattis. Maecenas metus dui, rhoncus eget erat quis, vehicula luctus justo. Aenean vel porta est, tristique mollis metus. Mauris gravida diam sit amet tellus pellentesque hendrerit. Maecenas ut suscipit metus. Nunc vel volutpat est, porta sodales nibh. Pellentesque varius ac massa nec varius.
    </p>
</article>

And i've got this on the stylesheet:

#abms
    {
        overflow:hidden;
    }

Doesnt matter what I try, I can't get the text to hide, I want this text to hide with overflow:hidden because I want it to be visible when using overflow:visible in my jquery code sheet.

All of the files are linked correcty (i know this because all the other css and jquery effects are working) but I just can not make this hide.

I've seen tutorials doing this and it works, why won't it work for me? if some one could point the error out, that would be great.

Someone help me please

Thanks

4

2 回答 2

1

如果要隐藏/显示文本,则必须更改display值,而不是overflow.

CSS:

#abms {
   display: none;
}

jQuery:

$('#abms').fadeIn(200)

演示:http: //jsfiddle.net/NcDUs/

于 2013-07-27T23:20:51.190 回答
0

尝试添加宽度并隐藏文本将隐藏在其中

http://jsfiddle.net/kKzyT/

喜欢

#abms
    {
      width:400px;
     height:200px;
     overflow:hidden;
    }

这里的文本将隐藏在width:400px;height:200px;

于 2013-07-27T23:18:02.363 回答