当我的主页加载时,它会做一些奇怪的事情,然后加载滑块图像。 这是首次加载页面时的下图,它对所有图像执行此操作,然后将其放入应该存在的位置,但它看起来像这样几秒钟。它有一个黑点,然后旁边有一些白色的空白区域,如下图所示。有关为什么我的代码导致此问题的任何想法?我正在从MYSQL数据库中检索图像链接。关于它为什么这样做的任何想法?先感谢您。
继承我的代码为滑块。
$stmt = $DB_con->prepare('SELECT * FROM slider WHERE live="on"');
$stmt->execute();
if($stmt->rowCount() > 0)
{
while($row=$stmt->fetch(PDO::FETCH_ASSOC))
{
extract($row);
?>
<li data-index="rs-80" data-transition="fade" data-slotamount="7" data-masterspeed="500"
data-saveperformance="on"
data-title="Intro Slide">
<img src="images/slider/<?php echo $row['link']; ?>" alt="slidebg1"
data-bgposition="center top" data-bgfit="cover"
data-bgrepeat="no-repeat">
<div class="revolution_heading_font tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="0"
data-y="200" data-speed="700" data-start="10" data-easing="Power3.easeInOut" data-splitin="chars"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #FFFFFF;font-size:30pt;font-family: Montserrat">
<?php echo $row['slide_name']; ?>
</div>
<div class="revolution_font tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="5"
data-y="300" data-speed="300" data-start="600" data-easing="Power3.easeInOut" data-splitin="words"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #ffffff;font-weight: 300;font-size:18pt; line-height: 30pt; margin-left:8px">
<?php echo $row['slide_desc'];?>
</div>
<?php
}
}
else
{
?>
<?php
}
?>
</li>
</ul>
</div>
</div>
没有任何PHP的原始滑块代码。
<div class="tp-banner-container rev_slider_wrapper fullwidthbanner-container"
data-alias="news-hero72">
<div class="tp-banner-slider">
<ul>
<li data-index="rs-80" data-transition="fade" data-slotamount="7" data-masterspeed="500"
data-saveperformance="on"
data-title="Intro Slide">
<img src="images/dummy.png" alt="slidebg1" data-lazyload="images/thumbnails/home_bowl.png"
data-bgposition="center top" data-bgfit="cover"
data-bgrepeat="no-repeat">
<div class="revolution_heading_font tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="0"
data-y="200" data-speed="700" data-start="10" data-easing="Power3.easeInOut" data-splitin="chars"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #FFFFFF;font-size:30pt;font-family: Montserrat">
Get Some Fun
</div>
<div class="revolution_font tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="5"
data-y="300" data-speed="300" data-start="600" data-easing="Power3.easeInOut" data-splitin="words"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #ffffff;font-weight: 300;font-size:18pt; line-height: 30pt; margin-left:8px">
A stones throw away from famous Coogee Beach,
</div>
<div class="revolution_font tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="5"
data-y="370" data-speed="300" data-start="1800" data-easing="Power3.easeInOut" data-splitin="words"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #ffffff;font-weight: 300;font-size:18pt; margin-left:8px">
perfect place to spend time with family & friends.
</div>
</li>
<li data-index="rs-81" data-transition="fade" data-slotamount="7" data-masterspeed="500"
data-saveperformance="on"
data-title="Intro Slide">
<img src="images/dummy.png" alt="slidebg1" data-lazyload="images/thumbnails/home_image.png"
data-bgposition="center top" data-bgfit="cover"
data-bgrepeat="no-repeat">
<div class="revolution_heading_font tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="0"
data-y="170" data-speed="700" data-start="10" data-easing="Power3.easeInOut" data-splitin="chars"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #FFFFFF;font-size:30pt;font-family: Montserrat;">
Game that makes you crazy
</div>
<div class="revolution_font tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="5"
data-y="270" data-speed="300" data-start="410" data-easing="Power3.easeInOut" data-splitin="words"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #ffffff;font-weight: 300;font-size:18pt; line-height: 30pt; margin-left:8px">
We offer huge discounts who come to have fun
</div>
<div class="revolution_font tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="5"
data-y="340" data-speed="300" data-start="1800" data-easing="Power3.easeInOut" data-splitin="words"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #ffffff;font-weight: 300;font-size:18pt; margin-left:8px">
A chance to earn points in referal scheme.
</div>
</li>
<li data-index="rs-82" data-transition="fade" data-slotamount="7" data-masterspeed="500"
data-saveperformance="on"
data-title="Intro Slide" class="home2_why">
<img src="images/dummy.png" alt="slidebg1" data-lazyload="images/thumbnails/home_bowl1.png"
data-bgposition="center top" data-bgfit="cover"
data-bgrepeat="no-repeat">
<div class="revolution_heading_font1 tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="0"
data-y="170" data-speed="700" data-start="10" data-easing="Power3.easeInOut" data-splitin="chars"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #FFFFFF;font-size:30pt; font-family: Montserrat">
WHY PEOPLE COME TO HAVE FUN WITH US?
</div>
<div class="revolution_font tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="5"
data-y="300" data-speed="300" data-start="600" data-easing="Power3.easeInOut" data-splitin="lines"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #ffffff;font-weight: 300;font-size:18pt; line-height: 30pt; margin-left:8px">
1. Lavishing Fun and Entertaintment Hub.
</div>
<div class="revolution_font tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="5"
data-y="355" data-speed="300" data-start="1800" data-easing="Power3.easeInOut" data-splitin="lines"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #ffffff;font-weight: 300;font-size:18pt; line-height: 30pt; margin-left:8px">
2. Keeping your taste in mind, we provide the best.
</div>
<div class="revolution_font tp-caption grey_heavy_72 skewfromrightshort tp-resizeme rs-parallaxlevel-2" data-x="5"
data-y="417" data-speed="300" data-start="2500" data-easing="Power3.easeInOut" data-splitin="lines"
data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1"
style="z-index: 5; max-width: inherit; max-height: inherit; white-space: nowrap;color: #ffffff;font-weight: 300;font-size:18pt; margin-left:8px">
3. We just never let a gamer to wait in a queue.
</div>
</li>
</ul>
</div>
</div>