Responsive閫夐」鍙敤浜庤缃産reakpoints鍜岄澶栫殑閫夐」銆傜缉鏀句綘鐨勬祻瑙堝櫒鐪嬬湅瀵艰埅鍜屾棆杞湪椹浣曞彉鍖栥€?/p>
璁剧疆responsive闈炲父绠€鍗曘€俽esponsive鍙傛暟鐨勭粨鏋勫涓?
responsive : {
// breakpoint from 0 up
0 : {
option1 : value,
option2 : value,
...
},
// breakpoint from 480 up
480 : {
option1 : value,
option2 : value,
...
},
// breakpoint from 768 up
768 : {
option1 : value,
option2 : value,
...
}
}
榛樿鎯呭喌涓嬶紝responsive鍙傛暟閫夐」璁剧疆涓簍rue锛屾墍浠ユ棆杞湪椹€绘槸璇曞浘鍖归厤瀹瑰櫒鐨勫搴﹀拰楂樺害锛堢敋鑷虫槸鍦╩edia queries涓嶈鏀寔鐨処E7/IE8涓篃鏄姝わ級
responsive:false
銆?/li>
$('.owl-carousel').owlCarousel({
loop:true,
margin:10,
responsiveClass:true,
responsive:{
0:{
items:1,
nav:true
},
600:{
items:3,
nav:false
},
1000:{
items:5,
nav:true,
loop:false
}
}
})
Optional helper class. Add 'owl-reponsive-' + 'breakpoint' class to main element.
As default all responsive breakpoints are corresponding with window
width. This option gives you an opportunity to change it to your own class/id like responsiveBaseElement:".myCustomWrapper"
What this does is wait 200ms after you changed the browser width and performs refresh actions (calculating widths/ cloning items etc.) Default refresh rate is 200ms. I think this rate is optimal but you can change it if it鈥檚 to slow for you.
As not every option is able to use responsive abilities, here鈥檚 a full list of responsive options.