帮我调试我的旋转木马的PHP代码,它不会滑开,我想念什么? 我希望它在页面加载时自动滑动,不要在我点击指示符时它不会滑动。
echo '<div id="myCarousel" class="carousel slide" data-ride="carousel">';
echo '
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
</ol>';
echo '<div class="carousel-inner" role="listbox">';
echo '<div class="item active">';
echo '<div class="jumbotron" style="border:solid 3px;height:500px;margin-top:20px">';
echo '<div class="containeractive col-md-6"
style="height:400px;border:solid 2px; margin: 0px 50px 10px 20px;
background-image:url('.$row['image'].');background-repeat:no-repeat;background-size:contain; background-position:center"></div>';
echo '<div class="container col-md-5" style="height:85px;border:solid 3px;margin-bottom:30px">'.$row['name'].'</div>';
echo '<div class="container col-md-5" style="height: 285px; border:solid 3px;">'.$row['description'].'</div>';
echo '</div>';
echo '</div>';
mysqli_data_seek($result,1);
$row2 = mysqli_fetch_array ($result);
echo '<div class="item">';
echo '<div class="jumbotron" style="border:solid 3px;height:500px;margin-top:20px">';
echo '<div class="container col-md-6"
style="height:400px;border:solid 2px; margin: 0px 50px 10px 20px;
background-image:url('.$row2['image'].');background-repeat:no-repeat;background-size:contain; background-position:center"></div>';
echo '<div class="container col-md-5" style="height:85px;border:solid 3px;margin-bottom:30px">'.$row2['name'].'</div>';
echo '<div class="container col-md-5" style="height: 285px; border:solid 3px;">'.$row2['description'].'</div>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
答案 0 :(得分:0)
你没有添加bootstrap的javascript。只需在身体部分的末尾添加它
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>