javascript - 猫头鹰 slider 改变 img src 打破 slider

标签 javascript jquery css slider

有人告诉我为什么this有效而不是this .我是否遗漏了一些重要的东西?

我只是将img src改成了不同的url

最佳答案

您只需要稍微整理一下 HTML:

<div id="owl-demo" class="owl-carousel">
    <div>
        <img src="http://img1.wikia.nocookie.net/__cb20130207094959/gundam/images/thumb/e/e6/HG_-_Perfect_Strike_Gundam_Box_Art.jpg/1024px-HG_-_Perfect_Strike_Gundam_Box_Art.jpg" alt="" />
        <img src="http://img1.wikia.nocookie.net/__cb20130207094959/gundam/images/thumb/e/e6/HG_-_Perfect_Strike_Gundam_Box_Art.jpg/1024px-HG_-_Perfect_Strike_Gundam_Box_Art.jpg" alt="" />
    </div>
    <div>
        <img src="http://img1.wikia.nocookie.net/__cb20130207094959/gundam/images/thumb/e/e6/HG_-_Perfect_Strike_Gundam_Box_Art.jpg/1024px-HG_-_Perfect_Strike_Gundam_Box_Art.jpg" alt="" />
        <img src="http://img1.wikia.nocookie.net/__cb20130207094959/gundam/images/thumb/e/e6/HG_-_Perfect_Strike_Gundam_Box_Art.jpg/1024px-HG_-_Perfect_Strike_Gundam_Box_Art.jpg" alt="" />
    </div>
    <div>
        <img src="http://img1.wikia.nocookie.net/__cb20130207094959/gundam/images/thumb/e/e6/HG_-_Perfect_Strike_Gundam_Box_Art.jpg/1024px-HG_-_Perfect_Strike_Gundam_Box_Art.jpg" alt="" />
        <img src="http://img1.wikia.nocookie.net/__cb20130207094959/gundam/images/thumb/e/e6/HG_-_Perfect_Strike_Gundam_Box_Art.jpg/1024px-HG_-_Perfect_Strike_Gundam_Box_Art.jpg" alt="" />
    </div>
    <div>
        <img src="http://img1.wikia.nocookie.net/__cb20130207094959/gundam/images/thumb/e/e6/HG_-_Perfect_Strike_Gundam_Box_Art.jpg/1024px-HG_-_Perfect_Strike_Gundam_Box_Art.jpg" alt="" />
        <img src="http://img1.wikia.nocookie.net/__cb20130207094959/gundam/images/thumb/e/e6/HG_-_Perfect_Strike_Gundam_Box_Art.jpg/1024px-HG_-_Perfect_Strike_Gundam_Box_Art.jpg" alt="" />
    </div>
</div>

关于javascript - 猫头鹰 slider 改变 img src 打破 slider ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25859573/

相关文章:

javascript - 如何在 Angular2 中禁用动态表单

jquery - 逗号分隔的选择器列表?

javascript - 如何使用比较浏览器窗口大小的功能在 slider 中将图像交换到另一个图像?

javascript - 检测对背景大小 : cover 的支持

javascript - jQuery 不会影响 ul 的第二个子级

html - Bootstrap : How to get a column with 100% the height of another column

JavaScript:从对象数组中获取唯一值及其计数?

javascript - hasOwnProperty 是遍历原型(prototype)链

javascript - 如何在 JS 中重新加载页面上的元素

php - 更改图库显示缩略图的方式