我處於一個棘手的情況 - 我試圖構建一種真實的傳單,底部有可點擊的紙條。只是爲了一個視覺參考,是這樣的:http://static.someecards.com/someecards/images/feed_assets/4d657f7fa4817.jpgfadeOut()僅適用於第一個:在僞元素之前
我建立了一個空的div的傳單正文,我絕對定位在這個div的底部的「紙條」。然後,因爲我想在飛行員身體的底部添加一張「破紙」邊框圖像,所以我給了這些條帶一個負Z指數。
然後,爲了覆蓋撕破的紙邊框,我在它們的頂部放置了一個空的透明div,一個純色的僞元素會在CSS3動畫被觸發後消失(通過JS )。
<div class="flyer-body">
<div class="strip"></div> <!-- this will be animated via CSS3 -->
<div class="strip-wrapper"></div> <!-- this is a clone of the "strip" div, but transparent (made for z-index problems with animations). a click on this div will trigger the animation -->
</div><!-- end flyer-body -->
的jsfiddle供參考:http://jsfiddle.net/XR7LT/
正如你所看到的,我爲了輕輕地消失應用淡出()效果僞元素。問題是,fadeOut()只適用於第一個僞元素,而隱藏其他元素沒有任何影響。
問題顯示在Chromium和FF瀏覽器上,Ubuntu Linux 12.10。
任何想法?
在此先感謝。
謝謝你這麼** **了。對不起,這個愚蠢的錯誤,你真的讓我的一天! :) – skz 2013-02-14 15:17:19