Parallax 猫头鹰旋转木马和视差背景
我必须在猫头鹰旋转木马中使用parallax.js作为背景图像。例如,我想使用 我怎么做? 钢笔:Parallax 猫头鹰旋转木马和视差背景,parallax,owl-carousel-2,Parallax,Owl Carousel 2,我必须在猫头鹰旋转木马中使用parallax.js作为背景图像。例如,我想使用 我怎么做? 钢笔: 塔姆公司 ihsisdijbvjd 乱数假文 asdsk jbsjfd .滑块{ 位置:相对位置; 显示:表格; } .盒子{ 显示:表格单元格; 垂直对齐:中间对齐; 宽度:1%; } .滑套{ 高度:800px; 宽度:100%; 背景色:#333; 背面尺寸:封面; } .h2{ 字体大小:40px; 字号:500; 保证金:0; 文本转换:大写; } .副标题{ 显示:块; 字体系列:“
塔姆公司
ihsisdijbvjd
乱数假文
asdsk jbsjfd
.滑块{
位置:相对位置;
显示:表格;
}
.盒子{
显示:表格单元格;
垂直对齐:中间对齐;
宽度:1%;
}
.滑套{
高度:800px;
宽度:100%;
背景色:#333;
背面尺寸:封面;
}
.h2{
字体大小:40px;
字号:500;
保证金:0;
文本转换:大写;
}
.副标题{
显示:块;
字体系列:“latolight”,无衬线;
字体大小:30px;
文本转换:大写;
}
.视差窗口{
最小高度:400px;
背景:透明!重要;
}
jQuery(文档).ready(函数(){
jQuery(“.slider”).owlCarousel({
项目:1,
循环:对,
导航:错,
点:错,
自动播放:对,
自动播放超时:4000,
animateIn:“fadeIn”,
//onChange:回调
});
//函数回调(事件){
//jQuery('.parallax window').parallax();
// }
});
<div class="owl-carousel slider">
<div class="item slide-wrapper parallax-window" data-parallax="scroll" data-image-src="http://trawnik.nazwa.pl/TrawnikProducent2016/wp-content/uploads/slide-strong-1.jpg">
<div class="container">
<div class="box">
<h2 class="h2 wow fadeIn text-right">co tam</h2>
<span class="subtitle wow fadeIn">ihsisdijbvjd</span>
</div>
</div>
</div>
<div class="item slide-wrapper parallax-window" data-parallax="scroll" data-image-src="http://www.focus.pl/upload/galleries/19/trawa-19061_l.jpg">
<div class="container">
<div class="box">
<h2 class="h2">lorem ipsum</h2>
<span class="subtitle">asdsk jbsjfd</span>
</div>
</div>
</div>
</div>
.slider {
position: relative;
display: table;
}
.box {
display: table-cell;
vertical-align: middle;
width: 1%;
}
.slide-wrapper {
height: 800px;
width: 100%;
background-color: #333;
backround-size: cover;
}
.h2 {
font-size: 40px;
font-weight: 500;
margin: 0;
text-transform: uppercase;
}
.subtitle {
display: block;
font-family: 'latolight', sans-serif;
font-size: 30px;
text-transform: uppercase;
}
.parallax-window {
min-height: 400px;
background: transparent !important;
}
jQuery(document).ready(function() {
jQuery(".slider").owlCarousel({
items: 1,
loop: true,
nav: false,
dots: false,
autoplay: true,
autoplayTimeout: 4000,
animateIn: 'fadeIn',
//onChange : callback
});
// function callback(event) {
// jQuery('.parallax-window').parallax();
// }
});