Здравствуйте, я хочу изменить переход моих скользящих текстов. Текущий эффект - затухание и исчезновение, но я бы хотел, чтобы .quotes
скользил или прокручивался вверх, а затем следующий блок из .quotes
. Что-то вроде вращающегося div, но переход к вершине. Я пробовал slideTop()
, но он немного отличается от того, что я хочу. Вот мой текущий код и jsfiddleВращающийся Div снизу вверх
HTML:
<div class="quotes">
<h3 class="heading green">GoScRUB orks Much Faster than a scrub brush on tough build-up</h3>
<h3 class="heading green">GoScRUB aves Money – it is about 1/10 the cost of a scrub rush</h3>
</div>
<div class="quotes">
<h3>GoScRUB s Better for the Environment than a scrub brush – less waste</h3>
<h3>GoScRUB s More Effective than a scrub brush – it lifts and peels off the debris</h3>
</div>
<div class="quotes">
<h3 class="heading green">GoScRUB Cleans Easily and is much more sanitary than a scrub brush</h3>
<h3 class="heading green">GoScRUB Lasts 10x Longer than a scrub brush (or more)</h3>
<h3 class="heading green">GoScRUB llows your Scrub Pads to Last Much Longer</h3>
</div>
Javascript:
(function() {
var quotes = jQuery(".quotes");
var quoteIndex = -1;
function showNextQuote() {
++quoteIndex;
quotes.eq(quoteIndex % quotes.length)
.fadeIn(2000)
.delay(2000)
.fadeOut(2000, showNextQuote);
}
showNextQuote();
})();
CSS:
.quotes h3{
padding-left:20px;
line-height: 52px;
margin-bottom: 13px;
}
.quotes {display: none;}
.heading-slide h3{
font-size:34px;
}
Вам нужен родительский контейнер для работы в качестве маски с 'переполнении : hidden ", когда вы анимируете цитаты сверху. – otinanai
Спасибо, вы можете показать это мне, используя мой jsfiddle? Спасибо :) – markyeoj