Mei*_*ham 2 javascript jquery jquery-plugins slideshow nivo-slider
我想让nivoSlider在这个网站http://fritech.co.uk/上工作,它有三张图片
<div id="slideshow" class="section theme-nivo">
<div class="ribbon"></div>
<div class="nivoSlider">
<img src="static/img/logos.png" alt="Our inhouse skills" />
<img src="static/img/atlanta.png" alt="Modern technologies" />
<img src="static/img/boston.png" alt="Ruggedly tested software" />
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
然而nivoSlider只显示其中一个,总是最顶层的.我不确定这里出了什么问题.任何帮助,将不胜感激.
您的问题是您#slideshow在html 中将id 添加到错误的容器中:
<div id="top" class="bordered-section">
<div id="slideshow" class="section theme-nivo">
<div class="ribbon"></div>
<div class="nivoSlider">
<img src="http://placehold.it/260x180" alt="Our inhouse skills" />
<img src="http://placehold.it/260x180" alt="Modern technologies" />
<img src="http://placehold.it/260x180" alt="Ruggedly tested software" />
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
ID应放在图像的容器上,用作背景图像.
固定.
<div id="top" class="bordered-section">
<div class="section theme-nivo">
<div class="ribbon"></div>
<div id="slideshow" class="nivoSlider">
<img src="http://placehold.it/260x180" alt="Our inhouse skills" />
<img src="http://placehold.it/260x180" alt="Modern technologies" />
<img src="http://placehold.it/260x180" alt="Ruggedly tested software" />
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
您可以在插件文档中找到正确的用法.