0

http://jsfiddle.net/Wdrgv/

所以我想把这个糟糕的动画放在屏幕的底部。很简单,对吧?

没有。当我戴上position: absolutemarquee-container,动画似乎从屏幕上消失了。

我想我在这里做了一些非常愚蠢的事情,但我看不出是什么。

4

2 回答 2

2

The problem is that when you apply the absolute positioning to the container, 'display: block; no longer stretches it to 100% of its container's width, and since it has no relatively-positioned contents to define its dimensions, it relies solely on explicitly defined values (height: 24px) or zero if none exist. I've fixed the problem for you by defining width: 100% for your containing element. I've also added a few tweaks to make the size and behavior of your marquee a little more robust given varying text lengths:

http://jsfiddle.net/Wdrgv/2/

于 2012-06-19T22:42:01.920 回答
1

我能够通过从absoluteto更改fixed并应用bottom:0px;到它来使其工作。

见这里:http: //jsfiddle.net/Wdrgv/1/

于 2012-06-19T22:31:45.340 回答