- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在开发一个站点并显示一些推荐,我正在使用 Owl Carousel 来显示它们。现在在桌面上一切看起来都很好而且完美无缺。
但是,在移动设备上,不是水平显示一条评论,而是出于某种原因垂直显示 4 条评论。
在我的 js 中,我指定了 items: 1
,但移动端似乎不符合要求。我也试过了
@media screen and (min-width: 768px) and (max-width: 1024px) {
#owl-client-reviews .review p {
width: 100% !important;
}
}
看看我是否可以更改移动显示器上的宽度。
这是我的代码:
html(轮播中共有 10 个元素)
<div id="owl-client-reviews" class="owl-carousel owl-theme">
<div class="review">
<p>
"client review"
</p>
<br>
<h4><span class="name">Client</span> <span class="review">Review</span> </h4>
</div>
CSS
#clients-reviews .review p{
font-family: 'PT Serif Caption', serif;
color: black;
font-size: 18px;
padding: 20px;
}
#clients-reviews .review span.name span.post{
color: #ed1f24;
}
#clients-reviews .owl-theme .owl-controls .owl-nav [class*=owl-] {
background: transparent;
color: #ffffff;
border: 2px solid #fed136;
font-size: 14px;
padding-bottom: 10px;
line-height: 14px;
}
@media screen and (min-width: 768px) and (max-width: 1024px) {
#owl-client-reviews .review p {
width: 100% !important;
}
}
js
$(document).ready(function() {
$("#owl-client-reviews").owlCarousel({
items: 1,
loop: true,
autoHeight: false,
autoHeightClass: 'owl-height',
dots: false,
navigation: true,
navigationText:[
"<i class='fa fa-angle-left fa-2x' style='color:black;'></i>",
"<i class='fa fa-angle-right fa-2x' style='color:black;'></i>"
]
});
});
有人看到我做错了什么吗?我不确定为什么它在手机/平板电脑上不只显示 1 个元素。任何帮助,将不胜感激。
最佳答案
您缺少 JavaScript owlCarousel 选项 singleItem:true
。像这样:
$("#owl-client-reviews").owlCarousel({
singleItem:true,
items: 1,
loop: true,
autoHeight: false,
autoHeightClass: 'owl-height',
dots: false,
navigation: true,
navigationText:[
"<i class='fa fa-angle-left fa-2x' style='color:black;'></i>",
"<i class='fa fa-angle-right fa-2x' style='color:black;'></i>"
]
});
添加 singleItem 会强制轮播一次只显示一个容器。
关于html - 在移动设备上显示多个元素的 Owl Carousel ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26514005/
我知道 owl:Class 是 rdfs:class 的子类,所有 OWL 类都是 owl:Class 的成员。我还知道 owl:Thing 位于类层次结构的顶部。那么 owl:Class 和 owl
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 5 年前。
我认为我对 OWL 公理仍然存在根本性的误解:(。 这是我创建的一个小型测试本体: @prefix xsd: . @prefix rdf: . @prefix rdfs:
我是耶拿的新手。我想创建一个新的 OntModel 并需要将一些其他本体导入到该模型中。如果我将其写入文件,我希望该文件可以显示如下内容: 现在,我不知道如何通过jena将其他本
我认为我对 OWL 公理仍然存在根本性的误解:(。 这是我创建的一个小型测试本体: @prefix xsd: . @prefix rdf: . @prefix rdfs:
我是耶拿的新手。我想创建一个新的 OntModel 并需要将一些其他本体导入到该模型中。如果我将其写入文件,我希望该文件可以显示如下内容: 现在,我不知道如何通过jena将其他本
导航和点周围的容器 .owl 控件不再存在,但我需要它们。有人知道如何恢复导航和点的环绕吗? 最佳答案 如果有人正在寻找...这是我的解决方案,用于取回 owl-nav 和 owl-dots 周围的包
对于我认为非常简单的场景,如果能提供一些帮助,我将不胜感激;但作为 OWL 和 GraphDB 的新手,我可能犯了一些基本错误。 我有一个非常简单的 Turtle 指定的 OWL 示例,如下所示: @
我使用 Protege 创建了一个本体。 类- Person Man Woman 属性(域/范围) Knows(Person / Person) hasRelationShip(Per
我正在使用 Protege v4.3 制作本体。 我有一个关于 OWL 本体和 DL 查询的问题。 例如,在 Pizza 本体中, http://owl.cs.manchester.ac.uk/co-
例如,此问题主要发生在用户使用速度较慢的互联网或移动设备时。但是,当轮播中的页面内容/图像没有被缓存时,有时也会在更高的速度上看到闪烁。 如果页面加载并呈现第一个元素,所有轮播“幻灯片”就像一个列表一
我需要在Protégé中实现一个OWL-ontology,它包含两个类:s1和s2,都是System的实例> 类。这两个类是通过连接类s1_s2 连接起来的,其中包含属性omega。该属性必须根据以下
我一直在四处寻找为什么 OWL Full 是不可判定的,但我还没有找到一个易于理解的例子来让我理解它。 我发现一些陈述解释了这是由于“Entailment Closure”,并且这也与 OWL Ful
我试图理解 OWL 2 的以下公理,但不知道它们是哪种公理。这里 R 是角色,C 是类 ∃R⊑C ∃R⊑∃R.C C ⊑ ¬∃R ∃R ⊑ ¬C 到目前为止,我认为 1 提供了有关 R 范围的信息,但
当 Owl Carousel 在隐藏元素中启动,然后通过触发器显示该元素时,轮播项目的宽度完全错误(直到窗口调整大小): Fiddle (点击红色链接,看到损坏的布局出现,然后调整窗口大小) 这个问题
在构建轮播时,我意识到猫头鹰添加了克隆的重复项。我的猫头鹰配置看起来像这样。我如何阻止这种情况发生。 owlDfe.owlCarousel({ loop: false,
我有两张幻灯片。我用的是 OWL 1,效果很好。我想要无限循环,所以搬到了 OWL 2。 下面的代码效果很好。幻灯片保持同步,但自动播放永远不会开始。我必须拖动幻灯片或显示导航并单击下一个/上一个。
我们根据分别与 B 或 C 的实例具有关系 a_to_b 和 a_to_c 的实例的交集 (AND),将类 A 定义为 owl:equivalentClass 并将类 A2 定义为 rdfs:subC
我正在使用 rdflib 创建一个图形。我想使用我拥有的“.owl”文件中的一些术语。我如何使用 rdflib 将这个 owl 文件作为 MyImportedTerminology 导入,并访问它的术
通常,当我们说“我所有的 child 都是女性”时,我们的意思是“并且至少有一个”。名门pizza tutorial (V1.3)在第 100 页解决了这个问题,说拥有普遍限制 (owl:allVal
我是一名优秀的程序员,十分优秀!