Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/379.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 引导转盘赢得';t滚动/加载_Javascript_Jquery_Html_Twitter Bootstrap 3_Carousel - Fatal编程技术网

Javascript 引导转盘赢得';t滚动/加载

Javascript 引导转盘赢得';t滚动/加载,javascript,jquery,html,twitter-bootstrap-3,carousel,Javascript,Jquery,Html,Twitter Bootstrap 3,Carousel,我已经浏览了一段时间的董事会和论坛,试图找出为什么我的旋转木马不会加载/滚动。我阅读了关于必须链接到popper.js文件的内容,阅读了关于在引导之前加载jquery和popper的内容,以及许多其他问题。一旦我开始加载popper.js,我的控制台就不会给我任何错误。有人能看到我的HTML中的一个问题并告诉我为什么旋转木马不会自动滚动或使用图标吗?当我点击旋转木马时,它不会做任何事情,不会给我任何错误,也不会像我加载popper js文件之前那样转到#the carousel。我感谢任何人能给

我已经浏览了一段时间的董事会和论坛,试图找出为什么我的旋转木马不会加载/滚动。我阅读了关于必须链接到popper.js文件的内容,阅读了关于在引导之前加载jquery和popper的内容,以及许多其他问题。一旦我开始加载popper.js,我的控制台就不会给我任何错误。有人能看到我的HTML中的一个问题并告诉我为什么旋转木马不会自动滚动或使用图标吗?当我点击旋转木马时,它不会做任何事情,不会给我任何错误,也不会像我加载popper js文件之前那样转到#the carousel。我感谢任何人能给予的帮助

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<!-- If IE use the latest rendering engine -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!-- Set the page to the width of the device and set the zoon level -->
<meta name="viewport" content="width = device-width, initial-scale = 1">

<title>Bootstrap Tutorial</title>

<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<link href="https://fonts.googleapis.com/css?family=Pacifico" rel='stylesheet' type='text/css'>

<style type="text/css">

/* Carousel Styling */
.slide1{
    background-image: url('./img/bkgrnd1.jpeg');
    height: 500px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.slide2{
    background-image: url('./img/bkgrnd2.jpg');
    height: 500px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.slide3{
    background-image: url('./img/bkgrnd3.jpg');
    height: 500px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.slide1{
    background-image: url('./img/bkgrnd4.jpeg');
    height: 500px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.carousel-caption h1{
    font-size: 5.4em;
    font-family: 'Pacifico', cursive;
    padding-bottom: .4em;
}
.carousel-caption p{
    font-size: 2em;
}
</style>

<body>

<div id="theCarousel" class="carousel slide" data-ride="carousel">

    <ol class="carousel-indicators">
        <li data-target="#theCarousel" data-slide-to="0" class="active"></li>
        <li data-target="#theCarousel" data-slide-to="1"></li>
        <li data-target="#theCarousel" data-slide-to="2"></li>
        <li data-target="#theCarousel" data-slide-to="3"></li>
    </ol>

    <div class="carousel-inner">
        <div class="item active">
            <div class="slide1"></div>
            <div class="carousel-caption">
                <h1>Amazing Backgrounds</h1>
                <p>Thousands of Backgrounds for Free</p>
                <p><a href="#" class="btn btn-primary btn-sm">Get them now!</a></p>
            </div>
        </div>
        <div class="item">
            <div class="slide2"></div>
            <div class="carousel-caption">
                <h1>This is SLIDE TWOO</h1>
                <p>Thousands of SLIDE TWOS for Free</p>
            </div>
        </div>
        <div class="item">
            <div class="slide3"></div>
            <div class="carousel-caption">
                <h1>Amazing ILLUSIONS</h1>
                <p>Thousands of SLIDE THREES for Free</p>
            </div>
        </div>
        <div class="item">
            <div class="slide4"></div>
            <div class="carousel-caption">
                <h1>Amazing COLORS</h1>
                <p>Thousands of SLIDE FOURS for Free</p>
                <p><a href="#" class="btn btn-primary btn-sm">BUTTON 4!</a></p>
            </div>
        </div>
    </div>

        <a class="left carousel-control" href="#theCarousel" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left"></span>
        <a class="right carousel-control" href="#theCarousel" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right"></span>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="/js/bootstrap.min.js"></script>


</body>
</html>

引导程序教程
/*旋转木马样式*/
.幻灯片1{
背景图像:url('./img/bkgrnd1.jpeg');
高度:500px;
背景重复:无重复;
背景位置:中心;
背景尺寸:封面;
}
.幻灯片2{
背景图片:url('./img/bkgrnd2.jpg');
高度:500px;
背景重复:无重复;
背景位置:中心;
背景尺寸:封面;
}
.幻灯片3{
背景图片:url('./img/bkgrnd3.jpg');
高度:500px;
背景重复:无重复;
背景位置:中心;
背景尺寸:封面;
}
.幻灯片1{
背景图像:url('./img/bkgrnd4.jpeg');
高度:500px;
背景重复:无重复;
背景位置:中心;
背景尺寸:封面;
}
.旋转木马标题h1{
字体大小:5.4em;
字体系列:“Pacifico”,草书;
填充底部:.4em;
}
.carousel标题p{
字号:2em;
}
  • 惊人的背景 数以千计的背景免费

    这是幻灯片二 数千张幻灯片免费下载

    惊人的幻想 免费提供数千张幻灯片

    惊人的颜色 免费提供数千张幻灯片

    
    
    把所有这些放在旋转木马的顶部,因为旋转木马需要这个完整的答案,我希望它能帮助你们

        <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    
    <!-- If IE use the latest rendering engine -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    
    <!-- Set the page to the width of the device and set the zoon level -->
    <meta name="viewport" content="width = device-width, initial-scale = 1">
    
    <title>Bootstrap Tutorial</title>
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
    
    
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    
    <link href="https://fonts.googleapis.com/css?family=Pacifico" rel='stylesheet' type='text/css'>
    
    <style type="text/css">
    
    /* Carousel Styling */
    .slide1{
        background-image: url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
        height: 500px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
    .slide2{
        background-image: url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
        height: 500px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
    .slide3{
        background-image: url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
        height: 500px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
    .slide1{
        background-image: url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
        height: 500px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
    .slide4{
        background-image: url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
        height: 500px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
    .carousel-caption h1{
        font-size: 5.4em;
        font-family: 'Pacifico', cursive;
        padding-bottom: .4em;
    }
    .carousel-caption p{
        font-size: 2em;
    }
    </style>
    
    <body>
    
    <div id="theCarousel" class="carousel slide" data-ride="carousel">
    
        <ol class="carousel-indicators">
            <li data-target="#theCarousel" data-slide-to="0" class="active"></li>
            <li data-target="#theCarousel" data-slide-to="1"></li>
            <li data-target="#theCarousel" data-slide-to="2"></li>
            <li data-target="#theCarousel" data-slide-to="3"></li>
        </ol>
    
        <div class="carousel-inner">
            <div class="item active">
                <div class="slide1"></div>
                <div class="carousel-caption">
                    <h1>Amazing Backgrounds</h1>
                    <p>Thousands of Backgrounds for Free</p>
                    <p><a href="#" class="btn btn-primary btn-sm">Get them now!</a></p>
                </div>
            </div>
            <div class="item">
                <div class="slide2"></div>
                <div class="carousel-caption">
                    <h1>This is SLIDE TWOO</h1>
                    <p>Thousands of SLIDE TWOS for Free</p>
                </div>
            </div>
            <div class="item">
                <div class="slide3"></div>
                <div class="carousel-caption">
                    <h1>Amazing ILLUSIONS</h1>
                    <p>Thousands of SLIDE THREES for Free</p>
                </div>
            </div>
            <div class="item">
                <div class="slide4"></div>
                <div class="carousel-caption">
                    <h1>Amazing COLORS</h1>
                    <p>Thousands of SLIDE FOURS for Free</p>
                    <p><a href="#" class="btn btn-primary btn-sm">BUTTON 4!</a></p>
                </div>
            </div>
        </div>
    
            <a class="left carousel-control" href="#theCarousel" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left"></span></a>
            <a class="right carousel-control" href="#theCarousel" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right"></span></a>
    </div>
    
    
    
    </body>
    </html>
    
    
    引导程序教程
    /*旋转木马样式*/
    .幻灯片1{
    背景图像:url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
    高度:500px;
    背景重复:无重复;
    背景位置:中心;
    背景尺寸:封面;
    }
    .幻灯片2{
    背景图像:url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
    高度:500px;
    背景重复:无重复;
    背景位置:中心;
    背景尺寸:封面;
    }
    .幻灯片3{
    背景图像:url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
    高度:500px;
    背景重复:无重复;
    背景位置:中心;
    背景尺寸:封面;
    }
    .幻灯片1{
    背景图像:url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
    高度:500px;
    背景重复:无重复;
    背景位置:中心;
    背景尺寸:封面;
    }
    .幻灯片4{
    背景图像:url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
    高度:500px;
    背景重复:无重复;
    背景位置:中心;
    背景尺寸:封面;
    }
    .旋转木马标题h1{
    字体大小:5.4em;
    字体系列:“Pacifico”,草书;
    填充底部:.4em;
    }
    .carousel标题p{
    字号:2em;
    }
    
  • 惊人的背景 数以千计的背景免费

    这是幻灯片二 数千张幻灯片免费下载

    惊人的幻想 免费提供数千张幻灯片

    惊人的颜色 免费提供数千张幻灯片

    
    
    把所有这些放在旋转木马的顶部,因为旋转木马需要这个完整的答案,我希望它能帮助你们

        <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    
    <!-- If IE use the latest rendering engine -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    
    <!-- Set the page to the width of the device and set the zoon level -->
    <meta name="viewport" content="width = device-width, initial-scale = 1">
    
    <title>Bootstrap Tutorial</title>
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
    
    
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    
    <link href="https://fonts.googleapis.com/css?family=Pacifico" rel='stylesheet' type='text/css'>
    
    <style type="text/css">
    
    /* Carousel Styling */
    .slide1{
        background-image: url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
        height: 500px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
    .slide2{
        background-image: url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
        height: 500px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
    .slide3{
        background-image: url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
        height: 500px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
    .slide1{
        background-image: url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
        height: 500px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
    .slide4{
        background-image: url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
        height: 500px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
    .carousel-caption h1{
        font-size: 5.4em;
        font-family: 'Pacifico', cursive;
        padding-bottom: .4em;
    }
    .carousel-caption p{
        font-size: 2em;
    }
    </style>
    
    <body>
    
    <div id="theCarousel" class="carousel slide" data-ride="carousel">
    
        <ol class="carousel-indicators">
            <li data-target="#theCarousel" data-slide-to="0" class="active"></li>
            <li data-target="#theCarousel" data-slide-to="1"></li>
            <li data-target="#theCarousel" data-slide-to="2"></li>
            <li data-target="#theCarousel" data-slide-to="3"></li>
        </ol>
    
        <div class="carousel-inner">
            <div class="item active">
                <div class="slide1"></div>
                <div class="carousel-caption">
                    <h1>Amazing Backgrounds</h1>
                    <p>Thousands of Backgrounds for Free</p>
                    <p><a href="#" class="btn btn-primary btn-sm">Get them now!</a></p>
                </div>
            </div>
            <div class="item">
                <div class="slide2"></div>
                <div class="carousel-caption">
                    <h1>This is SLIDE TWOO</h1>
                    <p>Thousands of SLIDE TWOS for Free</p>
                </div>
            </div>
            <div class="item">
                <div class="slide3"></div>
                <div class="carousel-caption">
                    <h1>Amazing ILLUSIONS</h1>
                    <p>Thousands of SLIDE THREES for Free</p>
                </div>
            </div>
            <div class="item">
                <div class="slide4"></div>
                <div class="carousel-caption">
                    <h1>Amazing COLORS</h1>
                    <p>Thousands of SLIDE FOURS for Free</p>
                    <p><a href="#" class="btn btn-primary btn-sm">BUTTON 4!</a></p>
                </div>
            </div>
        </div>
    
            <a class="left carousel-control" href="#theCarousel" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left"></span></a>
            <a class="right carousel-control" href="#theCarousel" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right"></span></a>
    </div>
    
    
    
    </body>
    </html>
    
    
    引导程序教程
    /*旋转木马样式*/
    .幻灯片1{
    背景图像:url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
    高度:500px;
    背景重复:无重复;
    背景位置:中心;
    背景尺寸:封面;
    }
    .幻灯片2{
    背景图像:url('https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg');
    高度:500px;
    背景重复:无重复
    
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
    
    <div id="theCarousel" class="carousel slide" data-ride="carousel">
    
    <ol class="carousel-indicators">
    <li data-target="#theCarousel" data-slide-to="0" class="active"></li>
        <li data-target="#theCarousel" data-slide-to="1"></li>
        <li data-target="#theCarousel" data-slide-to="2"></li>
        <li data-target="#theCarousel" data-slide-to="3"></li>
    </ol>
    
    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
     <div class="item active">
      <div class="slide1"></div>
            <div class="carousel-caption">
                <h1>Amazing Backgrounds</h1>
                <p>Thousands of Backgrounds for Free</p>
                <p><a href="#" class="btn btn-primary btn-sm">Get them now!</a></p>
            </div>
    </div>
    <div class="item">
      <div class="slide2"></div>
            <div class="carousel-caption">
                <h1>This is SLIDE TWOO</h1>
                <p>Thousands of SLIDE TWOS for Free</p>
            </div>
    </div>
    <div class="item">
      <div class="slide3"></div>
            <div class="carousel-caption">
                <h1>Amazing ILLUSIONS</h1>
                <p>Thousands of SLIDE THREES for Free</p>
            </div>
    </div> 
    <div class="item">
    <div class="slide4"></div>
            <div class="carousel-caption">
                <h1>Amazing COLORS</h1>
                <p>Thousands of SLIDE FOURS for Free</p>
                <p><a href="#" class="btn btn-primary btn-sm">BUTTON 4!</a></p>
            </div>
            </div>
     </div>
    <!-- Controls -->
    <a class="left carousel-control" href="#theCarousel" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#theCarousel" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
    </a>
    </div>
    
    /* Carousel Styling */
    .slide1{
    background-image: url('http://via.placeholder.com/700x700');
    height: 500px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    }
    .slide2{
    background-image: url('http://via.placeholder.com/700x700');
    height: 500px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    }
    .slide3{
    background-image: url('http://via.placeholder.com/700x700');
    height: 500px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    }
    .slide4{
    background-image: url('http://via.placeholder.com/700x700');
    height: 500px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    }
    .carousel-caption h1{
    font-size: 5.4em;
    font-family: 'Pacifico', cursive;
    padding-bottom: .4em;
    }
    .carousel-caption p{
    font-size: 2em;
    }