회전하는 텍스트 배너를 설정하려고합니다. 배너는 인라인 스타일을 사용하여 만들어집니다. 그러나 필자의 스크립트는 인라인 스타일을 지나치게 뛰어 넘는 것 같습니다.Javascript 텍스트 배너의 간격 변경 - 클릭하지 않음
$(window).load(function(){
var cnt=0, texts=[];
// save the texts in an array for re-use
$(".textContent").each(function() {
texts[cnt++]=$(this).text();
});
function slide() {
if (cnt>=texts.length) cnt=0;
$('#textMessage').html(texts[cnt++]);
$('#textMessage')
.fadeIn('slow').animate({opacity: 1.0}, 5000).fadeOut('slow',
function() {
return slide()
}
);
}
slide()
div.textContent { display:none;}
<div id="textMessage"></div>
<div class="textContent"><h2 style="padding:6px !important; background-color:#003768 !important; color:#8DC63F !important; font-size:27px !important;"><em>
Outsourcing ATMs - the smarter solution.</em>
</h2></div>
<div class="textContent"><h2 style="padding:6px; background-color:#003768; color:#8DC63F; font-size:27px;"><em>
Who spends ALL DAY on ATM Management? <span style="color:white";>Outsource ATM</span></em>
</h2></div>
<div class="textContent"><h2 style="padding:6px; background-color:#003768; color:#8DC63F; font-size:27px;"><em>
Quality service companies anticipate the needs of their clients by providing solutions - not more work.</em>
</h2>
</div>
https://jsfiddle.net/arunpjohny/ow9h3vxq/1/를? 다른 스타일은 어디에 있습니까 –
https://jsfiddle.net/arunpjohny/ow9h3vxq/2/ –