- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
早上好
我有一个 3 行的轮播,每行包含 8 个缩略图。我使用这个旋转木马来构建它,但由于某种原因它不起作用。
http://bootsnipp.com/snipps/thumbnail-carousel?codekitCB=399456659.566563
我的代码:
<div class="container">
<div id="myCarousel" class="matrix matrix-scroller carousel slide">
<!-- Carousel items -->
<div class="row">
<div class="carousel-inner">
<ul class="unstyled inline">
<div class="item active">
<div class="row">
<li class="square cyan span1"><a href="#"><img class="square_image" alt="" data="1" src="images/content/dummy-man01.png"/></a></li>
<li class="square orange span1"><a href="#"><img class="square_image" alt="" data="1" src="images/content/dummy-man01.png"/></a></li>
<li class="square green text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span txt-data="1" class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square magenta span1"><a href="#"><img class="square_image" alt="" data="1" src="images/content/dummy-man01.png"/></a></li>
<li class="square yellow span1"><a href="#"><img class="square_image" alt="" data="1" src="images/content/dummy-man01.png"/></a></li>
<li class="square cyan span1"><a href="#"><img class="square_image" alt="" data="2" src="images/content/dummy-man01.png"/></a></li>
<li class="square orange text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span txt-data="2" class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square green span1"><a href="#"><img class="square_image" alt="" data="2" src="images/content/dummy-man01.png"/></a></li>
</div>
</div>
<div class="item">
<div class="row">
<li class="square magenta text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square orange text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square green span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square orange text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square green text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square yellow span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square cyan span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square orange span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
</div>
</div>
<div class="item">
<div class="row">
<li class="square green span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square orange span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square cyan text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square orange text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square green span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square green text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square orange text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square cyan text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
</div>
</div>
</ul>
</div>
<!-- carousel nav-->
<a class="carousel-control left" href="#myCarousel" data-slide="prev" ></a>
<a class="carousel-control right" href="#myCarousel" data-slide="next" ></a>
<!--/carousel-->
</div><!--/row-->
</div><!--/myCarousel-->
最佳答案
我想我会把它放到一个答案中并提供代码,但我认为这是因为你嵌套了一个 <ul>
当它应该直接移动到一个“元素”时,直接在“carousel-inner”里面。
此外,您没有在代码中包含它,所以只想确保在页面中包含 bootstrap 和 jquery,并添加此行以及所需的 css:
<script type="text/javascript">
$(document).ready(function() {
$('#myCarousel').carousel({
interval: 10000
})
});
</script>
试试这个,看看它是否有效:
<div class="container">
<div id="myCarousel" class="matrix matrix-scroller carousel slide">
<!-- Carousel items -->
<div class="row">
<div class="carousel-inner">
<div class="item active">
<div class="row">
<ul class="unstyled inline">
<li class="square cyan span1"><a href="#"><img class="square_image" alt="" data="1" src="images/content/dummy-man01.png"/></a></li>
<li class="square orange span1"><a href="#"><img class="square_image" alt="" data="1" src="images/content/dummy-man01.png"/></a></li>
<li class="square green text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span txt-data="1" class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square magenta span1"><a href="#"><img class="square_image" alt="" data="1" src="images/content/dummy-man01.png"/></a></li>
<li class="square yellow span1"><a href="#"><img class="square_image" alt="" data="1" src="images/content/dummy-man01.png"/></a></li>
<li class="square cyan span1"><a href="#"><img class="square_image" alt="" data="2" src="images/content/dummy-man01.png"/></a></li>
<li class="square orange text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span txt-data="2" class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square green span1"><a href="#"><img class="square_image" alt="" data="2" src="images/content/dummy-man01.png"/></a></li>
</ul>
</div>
</div>
<div class="item">
<div class="row">
<ul class="unstyled inline">
<li class="square magenta text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square orange text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square green span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square orange text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square green text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square yellow span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square cyan span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square orange span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
</ul>
</div>
</div>
<div class="item">
<div class="row">
<ul class="unstyled inline">
<li class="square green span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square orange span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square cyan text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square orange text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square green span1"><a href="#"><img class="square_image" alt="" src="images/content/dummy-man01.png"/></a></li>
<li class="square green text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square orange text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
<li class="square cyan text-holder span1"><img alt="" src="images/layout/square-transparent.png" /><span class="text"><a href="#">“Duis id aliquam purus. nulla sodales auctor pretium.” <i class="lees-meer">lees meer »</i></a></span></li>
</ul>
</div>
</div>
</ul>
</div>
<!-- carousel nav-->
<a class="carousel-control left" href="#myCarousel" data-slide="prev" ></a>
<a class="carousel-control right" href="#myCarousel" data-slide="next" ></a>
<!--/carousel-->
</div><!--/row-->
</div><!--/myCarousel-->
关于html - Bootstrap 轮播不想滑动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18505529/
我的应用程序中有一个 IList 站点,并且站点有大量属性。 我想将此列表转换为 JSON,以便在类似于此的下拉列表中使用 var sites = SiteRepository.FindAll
我正在将一些代码从 bluebird 切换到原生 Promises,并且我对原生 promises 吞下错误这一事实感到相当恼火,即使没有定义 .catch() 也是如此。它使调试变得不可能,除非您在
在同步访问共享资源时,是否有理由不使用读/写锁而不是普通的互斥锁(基本上只是写锁),除了它具有比我可能需要的更多功能的哲学原因? 换句话说,如果我只是默认使用读/写锁作为我首选的同步结构,我是不是在踢
我刚进入这个元素,代码已经写好了,但我们发现了一个问题。当您单击菜单中的任何位置时,它会变成金色,您看不到菜单该部分中的任何链接。您可以再次单击它,它将返回到正常状态。这只发生在 Internet E
这是一个简单的类和简单的测试函数: #include #include namespace { using namespace std; } class NameStream {
我有一个 std::vector其中 Foo是一个包含 Foo( Foo&& ) noexcept 的类. 向容器中添加对象完美无缺,但是使用 std::vector::erase( iterator
我正在通过这段代码使用各种浏览器尝试 localStorage 和 JSON: function getStorage() { stored = JSON.pa
您可能认为此问题与 Running two projects at once in Visual Studio 完全相同.不完全是,恰恰相反。 我有一个带有两个 MVC3 项目的 VS 2010 解决
我正在制作一个网站:http://arc-angyal.hu/ 我的第一个问题是,我无法让左侧的红色 div 足够高以填充页眉和页脚之间的空间。它位于标题之后和导航之前。我已经设置: html, bo
根据 This Question ,我正在使用线程来终止用户输入的函数。我的代码看起来像: bool stopper = false; thread stopThread(userStop, &sto
我是一名优秀的程序员,十分优秀!