如何更改bootstrap轮播中的转换延迟

时间:2015-11-10 23:44:07

标签: jquery slider revolution-slider

我试图减慢主页上推荐滑块的转换速度。我会在哪里这样做?我试图更改css文件,bootstrap,但它不会这样做。我一直存在的问题是,当我改变转换时,它不会在每次转换之间“完成”。这是网址:www.urbandogex.com。任何帮助表示赞赏。我想完成这个网站。我也希望证言引用(文本)居中。

由于 赤竹

1 个答案:

答案 0 :(得分:0)

推荐书不是一个革命滑块,它是一个自举轮播。要更改其间隔,请打开scripts.js并编辑以下var tspan = DateTime.Now.Subtract(reqDate); string how_long_ago = PeriodOfTimeOutput(tspan); 值:

interval: 1500

这是为了改变一个革命滑块:看起来你正在使用的主题有一个过时版本的革命滑块(3.0.8),没有太多文档(如果有的话)可用。这只是猜测,但您可以尝试将以下属性添加到主html文件中的/******************************* carousel ***********************************/ $('.carousel').carousel({ interval: 1500 }); 标记中:

<li>(延迟15秒)

在您的代码中,延迟15秒,请尝试:

data-delay="15"

如果更新到最新版本(5.0),则可以在html文件中更改滑块初始化的javascript中的延迟属性:

<!-- Slider -->
        <article class="bannercontainer" style="overflow: visible;">
            <div class="banner  revslider-initialised tp-simpleresponsive" id="revslider-765" style="height: 789px;">
                <ul style="display: block; overflow: hidden; width: 100%; height: 100%; max-height: 800px;">                        
                    <li data-transition="fade" data-slotamount="1" data-delay="15" style="width: 100%; height: 100%; overflow: hidden; visibility: visible; left: 0px; top: 0px; z-index: 18; opacity: 1;">
                        <div class="slotholder"><img src="./Urban Dog Excursions, Issaquah, WA, Issaquah Highlands, Klahanie, Sammamish, Mirrormont, Tiger Mt., Tiger Mountain, dog walking, dog walker, dog walkers, pet sitter, pet sitting, dog sitting, cat sitting, pet transportation_files/slider01.jpg" alt="//" class="defaultimg" style="width: 1894px; height: 1263px; opacity: 0; position: relative;"></div>
                        <div class="caption lfb  tp-caption start" data-x="left" data-y="top" data-speed="800" data-start="300" data-easing="easeOutBack" style="font-size: 17px; padding: 0px; margin: 0px; border-width: 0px; line-height: 24px; white-space: nowrap; min-width: 0px; min-height: 0px; transform: scale(1, 1) rotate(0deg); opacity: 1; left: 347px; top: 849px; visibility: visible;">       
                            <p><span>Pet Sitting</span>With me your pet is treated like<br> family. Loving care, companionship, <br>and fun.</p>
                            <a href="http://www.urbandogex.com/services.html" class="">Services/Pricing</a>
                        </div>                                 
                    </li>

                    <li data-transition="3dcurtain-vertical" data-slotamount="1" data-delay="15" style="width: 100%; height: 100%; overflow: hidden; visibility: visible; left: 0px; top: 0px; z-index: 18; opacity: 1; position: absolute;">
                        <div class="slotholder"><img src="./Urban Dog Excursions, Issaquah, WA, Issaquah Highlands, Klahanie, Sammamish, Mirrormont, Tiger Mt., Tiger Mountain, dog walking, dog walker, dog walkers, pet sitter, pet sitting, dog sitting, cat sitting, pet transportation_files/slider02.jpg" alt="//" class="defaultimg" style="width: 1894px; height: 1263px; opacity: 0;"></div>
                        <div class="caption lfb  tp-caption start" data-x="left" data-y="top" data-speed="800" data-start="400" data-easing="easeOutBack" style="font-size: 17px; padding: 0px; margin: 0px; border-width: 0px; line-height: 24px; white-space: nowrap; min-width: 0px; min-height: 0px; transform: scale(1, 1) rotate(0deg); opacity: 1; left: 347px; top: 849px; visibility: visible;">   
                            <p><span>Dog Walking</span> Make a difference in how your dog <br>feels about himself after a  <br>healthy daily walk.</p>
                            <a href="http://www.urbandogex.com/Services.html" class="">Services</a>
                        </div>  
                    </li> 

                    <li data-transition="papercut" data-slotamount="1" data-delay="15" style="width: 100%; height: 100%; overflow: hidden; visibility: visible; left: 0px; top: 0px; z-index: 20; opacity: 1; position: absolute; transform: scale(1, 1) translate(0px, 0px) rotate(0deg);">
                        <div class="slotholder"><img src="./Urban Dog Excursions, Issaquah, WA, Issaquah Highlands, Klahanie, Sammamish, Mirrormont, Tiger Mt., Tiger Mountain, dog walking, dog walker, dog walkers, pet sitter, pet sitting, dog sitting, cat sitting, pet transportation_files/slider03.jpg" alt="//" class="defaultimg" style="width: 1894px; height: 1263px; opacity: 1;"></div>
                        <div class="caption lfb  tp-caption start" data-x="left" data-y="top" data-speed="1000" data-start="500" data-easing="easeOutBack" style="top: 0px; font-size: 17px; padding: 0px; margin: 0px; border-width: 0px; line-height: 24px; white-space: nowrap; min-width: 0px; min-height: 0px; transform: scale(1, 1) rotate(0deg); opacity: 1; left: 347px; visibility: visible;">    
                            <p><span>Pet Taxi</span> I make sure your pet gets to <br>his appointments.</p>
                            <a href="http://www.urbandogex.com/Services.html" class="">Pet Taxi</a>
                        </div>                                    
                    </li> 
                </ul>
            <div class="tp-loader" style="display: none;"></div><div class="tp-bannertimer" style="visibility: hidden; width: 28.5169%; overflow: hidden;"></div></div>
        <div class="tp-bullets simplebullets round hidebullets" style="bottom: 20px; left: 50%; margin-left: -55px;"><div class="bullet first"></div><div class="bullet"></div><div class="bullet last"></div><div class="tpclear"></div></div><div style="position: absolute; top: 20px; margin-top: -20px; left: 20px;" class="tp-leftarrow tparrows default hidearrows"></div><div style="position: absolute; top: 20px; margin-top: -20px; right: 20px;" class="tp-rightarrow tparrows default hidearrows"></div></article>
        <!-- End Slider -->