Owl carousel 100% height(猫头鹰旋转木马 100% 高度)
问题描述
I have a little problem with owl carousel 2,
This is the old version of my site, http://lukaszradwan.com/pl/ please take a look at the main slider. This is not owl carousel, I don't know what it is but it works fine (height is set to 100%) - and it's too heavy.
I have changed it to owl carousel, see this http://lukaszradwan.com/ It's responsive but I can't set height to 100%.
JS
$('.owl-carousel').owlCarousel({
items:1,
margin:0,
loop:true,
nav:true
});
HTML
<div class="slider_container">
<div class="owl-carousel">
<div class="item"><img src="aW1nL2Jhbm5lcnMvc2xhamQuanBn" alt="VGhlIExhc3Qgb2YgdXM="> </div>
<div class="item"><img src="aW1nL2Jhbm5lcnMvc2xhamQuanBn" alt="VGhlIExhc3Qgb2YgdXM="></div>
<div class="item"><img src="aW1nL2Jhbm5lcnMvc2xhamQuanBn" alt="VGhlIExhc3Qgb2YgdXM="></div>
</div>
</div>
</div>
If You have any ideas how to do this, please share with me. Thanks in advance.
I solved the 100% height problem on mobile with css. I know this is not the best solution but it works so far ...
.header-carousel.owl-carousel.owl-theme.owl-loaded.owl-drag,
.header-carousel .owl-stage-outer,
.header-carousel .owl-stage,
.header-carousel .owl-item,
.header-carousel .item,
.header-carousel .owl-item,
.header-carousel .img-responsive{
height: 100vh;
object-fit: cover;
}
这篇关于猫头鹰旋转木马 100% 高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:猫头鹰旋转木马 100% 高度


- 我不能使用 json 使用 react 向我的 web api 发出 Post 请求 2022-01-01
- 如何向 ipc 渲染器发送添加回调 2022-01-01
- 在不使用循环的情况下查找数字数组中的一项 2022-01-01
- 如何显示带有换行符的文本标签? 2022-01-01
- 如何调试 CSS/Javascript 悬停问题 2022-01-01
- 从原点悬停时触发 translateY() 2022-01-01
- 使用 iframe URL 的 jQuery UI 对话框 2022-01-01
- 为什么我的页面无法在 Github 上加载? 2022-01-01
- 为什么悬停在委托事件处理程序中不起作用? 2022-01-01
- 是否可以将标志传递给 Gulp 以使其以不同的方式 2022-01-01