我在我的网页上实现了一个云轮播,但是当图像在一个圆圈中滑动时,当我通过 php 从数据库加载动态内容时,左侧的图像无法正确显示。发生的是应该在后面的图像实际上在前面渲染。看这张图片看看问题
轮播问题 http://gzerodesign.com/images/carouselProblem.png
您可以在左侧看到,继电器健康标志位置在前面。右侧工作正常。加载动态图像时可以解决这个问题吗?
这是我的代码
<script>
$(document).ready(function(){
// This initialises carousels on the container elements specified, in this case, carousel1.
$("#carousel1").CloudCarousel(
{
xPos: 490,
yPos:20,
buttonLeft: $("#left-but"),
buttonRight: $("#right-but"),
altBox: $("#alt-text"),
titleBox: $("#title-text"),
mouseWheel:true,
FPS:30,
speed:0.2,
mouseWheel:true,
reflHeight:40,
reflOpacity:.25,
reflGap:1,
yRadius:40,
xRadius:330,
minScale:.35,
autoRotate:'left'
}
);
});
</script>
<div id="carousel">
<h2>Success Stories</h2>
<!-- Define elements to accept the alt and title text from the images. -->
<!-- This is the container for the carousel. -->
<div id = "carousel1" style="width:840px; height:186px; z-index:1; left:-180px;background:none;overflow:scroll;">
<!-- All images with class of "cloudcarousel" will be turned into carousel items -->
<!-- You can place links around these images -->
<?php do { ?>
<a class="thumbnail" href="admin/edit_company.php?co_id=<?php echo $row_rsCompanies['co_id']; ?>" id="trigger"><img class = "cloudcarousel" src="images/logo/<?php echo $row_rsCompanies['co_picture']; ?>" border="0" />
<span><img src="images/logo/<?php echo $row_rsCompanies['co_picture']; ?>" />
<?php echo $row_rsCompanies['co_short_description']; ?>
</span>
</a>
<?php } while ($row_rsCompanies = mysql_fetch_assoc($rsCompanies)); ?>
<!--end id="carousel1"--></div>
<!--end id="carousel"--></div>
谢谢你的帮助!!