简体   繁体   English

图像滑块无法正确加载

[英]Image slider not loading properly

This is the html for my website. 这是我网站的html。 I would like to add this image slider: . 我想添加此image slider: I have one problem, for some reason all I get is 4 bullet point and a error img picture next to it. 我有一个问题,由于某种原因,我得到的只是4个项目符号,旁边是一个错误img图片。 Could you look at my html and see what you could do to help. 你能看一下我的html,看看你能做什么来帮助。

-Thanks -谢谢

http://jsfiddle.net/lasquish/hL7vLcd5/ http://jsfiddle.net/lasquish/hL7vLcd5/

<div class="container">
    <ul class="slider">
        <li><img src="/images/Day1.jpg" /></li>
        <li><img src="/images/Day1.jpg" /></li>
        <li><img src="/images/Day1.jpg" /></li>
        <li><img src="/images/Day1.jpg" /></li>
    </ul>
</div>

This is the Script: 这是脚本:

<script src="js/jquery.bxslider.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src = "js/bootstrap.js"></script>
<script>
    $(document).ready(function(){
        $('.bxslider').bxSlider();
    });
</script>

Since you have wrapped slide content with .slider class you need to do following changes 由于您已使用.slider类包装了幻灯片内容,因此需要进行以下更改

$(document).ready(function(){
    $('.slider').bxSlider();
});

Call bxslider.min.js after jQuery library Also you have call 2 different version of jQuery library. 在jQuery库之后调用bxslider.min.js。此外,您还调用了2个不同版本的jQuery库。 this will make conflict. 这会造成冲突。

  1. You need to add below css to remove bullet 您需要在css下方添加以删除项目符号

    ul { list-style-type: none; ul {list-style-type:none; } }

  2. Need to use correct image path or you can use full image " http://fiddle.jshell.net/img/logo.png "... 需要使用正确的图像路径,否则您可以使用完整图像“ http://fiddle.jshell.net/img/logo.png ” ...

As you have not shared all required file here ..so we unable to test at our end. 由于您尚未在此处共享所有必需的文件,因此我们无法在最后进行测试。 Please share js library file which you have include here if problem no solve. 如果无法解决问题,请共享包含在此处的js库文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM