我的HTML轮播无效

时间:2016-11-10 23:57:35

标签: html

我的HTML:

<!DOCTYPE html>
    <html>
        <head>
            <meta charset="utf-8">
            <title>Figueiredo</title>
            <link rel="stylesheet" href="css/other.css" type="text/css"/>
        </head>
        <body>
            <div id="HEADER" class="header-cont">
                <ul>
                    <li><a href="https://www.google.pt/webhp?sourceid=chrome-instant&rlz=1C1ASUC_enPT607PT607&ion=1&espv=2&ie=UTF-8#q=filmes"</a> Filmes</li>
                    <li><a href="https://www.google.pt/webhp?sourceid=chrome-instant&rlz=1C1ASUC_enPT607PT607&ion=1&espv=2&ie=UTF-8#q=filmes"</a> Música</li>
                    <li><a href="https://www.google.pt/webhp?sourceid=chrome-instant&rlz=1C1ASUC_enPT607PT607&ion=1&espv=2&ie=UTF-8#q=filmes"</a> Portefólio</li>
                    <li><a href="https://www.google.pt/webhp?sourceid=chrome-instant&rlz=1C1ASUC_enPT607PT607&ion=1&espv=2&ie=UTF-8#q=filmes"</a> Contactos</li>

                </ul>
            </div>
            <div id="myCarousel" class="carousel slide" data-ride="carousel">
                <ol class="carousel-indicators">
                    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                    <li data-target="#myCarousel" data-slide-to="1"></li>
                    <li data-target="#myCarousel" data-slide-to="2"></li>
                </ol>
                <div class="carousel-inner" role="listbox">
                    <div class="item active">
                        <a href="figueiredo.html"> <img src="https://s-media-cache-ak0.pinimg.com/736x/79/46/75/7946751143452f74384ed52d917af00e.jpg"> </a>
                    </div>
                    <div class="item">
                        <a href="figueiredo.html"> <img src="http://blog.signalnoise.com/wp-content/uploads/2014/10/twitter_drive_bbc.jpg"> </a>
                    </div>
                    <div class="item">
                    <a href="figueiredo.html"> <img src="http://orig07.deviantart.net/b8b1/f/2009/202/8/9/the_matrix_poster_art_by_themadmind.jpg"> </a>
                </div>
                </div>
                <a class="left carousel-control" href="#myCarousel" 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="#myCarousel" role="button" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                    <span class="sr-only">Next</span>
                </a>
            </div>
        </body>
    </html>

我从w3schools复制了代码,但它不起作用。我想创建一个旋转木马,其中三个图像链接在代码中。如果可能的话,我也想知道如何将旋转木马垂直放置。

我得到了什么:

enter image description here

1 个答案:

答案 0 :(得分:0)

尝试在html的head部分中包含指向JS的链接。

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>