我有兩個文本作爲介紹,其中text1消失和text2保持。問題是,當text1消失時,下面的content div閃爍,並在text2出現時返回到它的位置。任何人都可以解決這個問題嗎?這裏是我的小提琴http://jsfiddle.net/qdrtsvf3/1/Div閃爍淡出
HTML
<div class="text1 animated zoomIn">Welcome to our site</div>
<div class="animated text2 bounceIn">Company Name</div>
<div class="content">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
CSS:
body { padding-top:30px;}
.text2 {
display: none;
}
.text1,.text2 {
font-size:30px;
font-weight:bold;
text-transform:uppercase;
text-align:center;
}
.content { background:red}
JS:
function fade() {
$('.text1').fadeIn().delay(2000).fadeOut();
$('.text2').delay(2500).fadeIn();
}
fade();
好,寬度調整..它是optionary !! – Adhik 2015-04-06 09:14:48