Почему owl-carousel не выводит слайд по одиночке?
13.12.2020, 00:13. Показов 1603. Ответов 0
При ширине экрана до 999px owl-carousel выводит мне блоки в столбик, ая в настройках задал, чтобы отображалось по 3 item-а. В чем проблема?
сайт http://norum1991.beget.tech/
код http://jsfiddle.net/x3p26adh/
сама карусель находится в секции features
| HTML5 | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/clear.css">
<link rel="stylesheet" href="css/adaptive.css">
<link rel="stylesheet" href="css/hamburgers.min.css">
<title>Giant</title>
<script src="js/script.js"></script>
<link href="css/owl.carousel.min.css" rel="stylesheet" type="text/css" />
<link href="//db.onlinewebfonts.com/c/ccb2ab50ca7958d0cd3c8d8e47730493?family=Dosis" rel="stylesheet" type="text/css"/>
<link href="//db.onlinewebfonts.com/c/00cb564c334c9557d660e82fd3439ac1?family=Roboto+Light" rel="stylesheet" type="text/css"/>
<script src="js/owl.carousel.min.js" type="text/javascript"></script>
<link href="img/favicon.png" rel="shortcut icon" type="image/x-icon" />
</head>
<body>
<section class="banner">
<div class="header">
<div class="wrapper">
<a href="index.html" class="logo"><img src="img/logo.png" alt="logo">Giant</a>
<div class="menu-btn">
<div class="hamburger_wrapper">
<div class="hamburger hamburger--spin">
<div class="hamburger-box">
<div class="hamburger-inner"></div>
</div>
</div>
</div>
</div>
<div class="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Features</a></li>
<li><a href="#">Pircing</a></li>
<li><a href="#">Download Now</a></li>
</ul>
</div>
</div>
</div>
<div class="bg"></div>
<div class="wrapper">
<div class="content">
<div class="banner_main_text">
<h1>A Powerful & Unique<br>App Landing Template</h1>
</div>
<div class="banner_main_text_2">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor<br> incididunt ut labore et dolore magna aliqua.</p>
</div>
<div class="desc">
<ul>
<li>Unlimited colors: banner with images, slider or video</li>
<li>Fully Responsive and powered by HTML5 and CSS3</li>
<li>Very easy to customize : set up in minutes</li>
</ul>
</div>
<a href="#" class="start">Start Exploring Us</a>
<div class="banner_phone"></div>
</div>
</div>
</section>
<section class="features">
<div class="wrapper">
<div class="content">
<ul class="owl-carousel features-list">
<li>
<img src="img/icons/1.png" alt="1">
<div class="features-text">
<h3>Sell any product online</h3>
<p>Over 92% of computers are infected with Adware and spyware. Such software is</p>
</div>
</li>
<li>
<img src="img/icons/2.png" alt="2">
<div class="features-text">
<h3>Sell any product online</h3>
<p>Many of us are so used to working on a computer desktop that when it comes</p>
</div>
</li>
<li>
<img src="img/icons/3.png" alt="3">
<div class="features-text">
<h3>Unlimited colors</h3>
<p>Audio player software is used to play back sound recordings in one of the many</p>
</div>
</li>
<li>
<img src="img/icons/4.png" alt="4">
<div class="features-text">
<h3>Responsive, HTML5, CSS3</h3>
<p>Computers have become ubiquitous in almost every facet of our lives/ At work,</p>
</div>
</li>
<li>
<img src="img/icons/5.png" alt="5">
<div class="features-text">
<h3>Designed to convert</h3>
<p>If you are looking for a new way to promote your business that won't cost</p>
</div>
</li>
<li>
<img src="img/icons/6.png" alt="6">
<div class="features-text">
<h3>With no boundaries</h3>
<p>Now, if you are interested in being the best player, getting realy good money and</p>
</div>
</li>
</ul>
<hr>
<div class="features-info">
<div class="features-info-img"></div>
<div class="features-info-text">
<h3>We don’t leave you stranded</h3>
<p>Everyone’s reasons for learning user interface design are different. If you’re already a developer, or a PM, or a UX designer, why develop this totally separate skill?</p>
<p class="middle">Everyone’s reasons for learning user interface design are different. If you’re already a developer, or a PM, or a UX designer, why develop this totally separate skill? If you’re already a developer, or a PM, or a UX designer.</p>
<div class="desc-two">
<ul>
<li>Unlimited colors: banner with images, slider or video</li>
<li>Fully Responsive and powered by HTML5 and CSS3</li>
<li>Very easy to customize : set up in minutes</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
</body> |
|
| JavaScript | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
| jQuery(document).ready(function($) {
var $hamburger = $(".hamburger");
$hamburger.on("click", function(e) {
$(this).toggleClass("is-active");
$('.menu').toggleClass('menu_open');
$('.content').toggleClass('content_move');
$('.logo ').toggleClass('logo_move');
$('.bg ').toggleClass('bg_show');
});
$('.owl-carousel.features-list').owlCarousel({
loop:true,
margin:10,
responsiveClass:true,
responsive:{
0:{
items:1,
nav:true
},
999:{
items:3,
nav:true
},
1000:{
items:6,
nav: false,
loop:false
}
}
})
}); |
|
| CSS | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
| html,
body {
width: 100%;
height: 100%;
}
/*Basic settings*/
section {
width: 100%;
height: 100%;
}
.wrapper {
max-width: 1400px;
width: 100% ;
margin: 0 auto 0 auto;
padding: 0 60px 0 60px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.bg {
position: fixed;
height: 100%;
width: 100%;
background-color: black;
top: 0;
left: 0;
z-index: 100;
display: none;
}
.content {
margin-top: 120px;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.content_move {
-webkit-transform: translateX(-200px);
transform: translateX(-200px);
}
/*Section banner*/
.banner {
background: url(../img/BG.png) center no-repeat;
background-size: cover;
}
.banner_main_text h1 {
font-family: 'Dosis', 'Arial';
font-size: 54px;
line-height: 60px;
font-weight: 600;
color: #ffffff;
margin-bottom: 20px;
}
.banner_main_text_2 {
font-family: 'Roboto', 'Arial';
font-size: 14px;
line-height: 24px;
font-weight: 300;
color: #ffffff;
margin-bottom: 20px;
}
.banner_phone {
background: url(../img/iPhones.png) no-repeat;
background-size: contain;
width: 836px;
height: 571px;
display: inline-block;
position: absolute;
right: 0;
top: 0;
margin-top: 140px;
float: right !important;
}
.header {
padding-top: 30px;
}
.header .wrapper {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.header .logo {
display: block;
width: 180px;
font-family: 'Dosis', 'Arial';
font-size: 36px;
line-height: 24px;
font-weight: 700;
color: #ffffff;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.header .logo_move {
-webkit-transform: translateX(-200px);
transform: translateX(-200px);
}
.header .menu ul li {
display: inline-block;
}
.header .menu ul li:last-child a {
font-family: 'Roboto', 'Arial';
font-size: 14px;
line-height: 24px;
font-weight: 700;
color: #222222;
background-color: #fff;
padding: 10px 20px;
border-radius: 17.5px;
margin-left: 50px;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.header .menu ul li:last-child a:hover {
background-color: #36aaa3;
color: #fff;
}
.header .menu ul li:nth-child(-n+3) a {
font-family: 'Roboto', 'Arial';
font-size: 14px;
line-height: 24px;
font-weight: 400;
color: #ffffff;
margin-left: 50px;
position: relative;
color: #fff;
cursor: pointer;
}
.header .menu ul li:nth-child(-n+3) a:after {
display: block;
position: absolute;
left: 0;
width: 0;
height: 2px;
background-color: #fff;
content: "";
-webkit-transition: width 0.3s ease-out;
transition: width 0.3s ease-out;
}
.header .menu ul li:nth-child(-n+3) a:hover:after,
.header .menu ul li:nth-child(-n+3) a:focus:after {
width: 100%;
}
.hamburger_wrapper {
display: none;
}
.hamburger-inner,
.hamburger-inner:after,
.hamburger-inner:before {
background-color: #fff !important;
}
.desc {
margin-bottom: 50px;
}
.desc li {
font-size: 14px;
font-family: 'Roboto', 'Arial';
line-height: 24px;
font-weight: 400;
color: #ffffff;
margin-bottom: 20px;
}
.desc li:before {
content: "";
background: url(../img/check.svg);
display: inline-block;
width: 16px;
height: 16px;
background-size: 100%;
margin-right: 20px;
}
a.start {
font-family: 'Roboto', 'Arial';
font-size: 14px;
line-height: 30px;
font-weight: 600;
color: #222222;
background-color: #fff;
border-radius: 20px;
padding: 15px 50px;
-webkit-box-shadow: 0px 10px 30px -5px rgba(0, 0, 0, 0.1);
box-shadow: 0px 10px 30px -5px rgba(0, 0, 0, 0.1);
-webkit-transition: 0.3s;
transition: 0.3s;
}
a.start:hover {
background-color: #36aaa3;
color: #fff;
}
/*Section features*/
.features {
background-color: #fff;
}
.features-list .owl-stage-outer {
margin-bottom: 120px !important;
}
.features-list .owl-item {
width: calc(33.33333333%) !important;
margin: 0 !important;
}
.features-list .owl-item img {
width: 24px !important;
height: 24px !important;
border: 1px solid #eeeeee;
padding: 25px !important;
border-radius: 100% !important;
}
.features-list .owl-item li {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal !important;
-webkit-box-direction: normal !important;
-ms-flex-direction: row !important;
flex-direction: row !important;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.features-text {
padding: 40px;
}
.features-text h3 {
font-family: 'Dosis', 'Arial';
font-size: 24px;
line-height: 24px;
font-weight: 500;
color: #222222;
}
.features-text p {
padding-top: 20px;
font-family: 'Roboto', 'Arial';
font-size: 14px;
line-height: 24px;
font-weight: 300;
color: #777777;
}
.features hr {
width: 100%;
height: 2px;
background-color: #eeeeee;
border: none;
margin-bottom: 120px;
}
.features-info {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
padding-bottom: 120px !important;
}
.features-info-img {
background: url(../img/delta_phone.png) center no-repeat;
background-size: 100%;
width: 362px;
height: 469px;
}
.features-info-text {
width: 50%;
margin-top: 50px;
}
.features-info-text h3 {
font-family: 'Dosis', 'Arial';
font-size: 36px;
line-height: 30px;
font-weight: 500;
color: #222222;
margin-bottom: 20px;
}
.features-info-text p {
font-family: 'Roboto', 'Arial';
font-size: 14px;
line-height: 24px;
font-weight: 300;
color: #777777;
padding: 0 60px 0 0;
}
.features-info-text p.middle {
margin: 70px 0 30px 0;
}
.features-info-text .desc-two {
margin-bottom: 50px;
}
.features-info-text .desc-two li {
font-size: 14px;
font-family: 'Roboto', 'Arial';
line-height: 24px;
font-weight: 400;
color: #777777;
margin-bottom: 20px;
}
.features-info-text .desc-two li:before {
content: "";
background: url(../img/check-black.svg);
display: inline-block;
width: 16px;
height: 16px;
background-size: 100%;
margin-right: 20px;
}
@media (max-width: 1400px) {
.banner_phone {
width: 736px;
}
.features-text {
padding: 35px ;
}
.features-text h3 {
font-size: 22px;
}
.features-text p {
font-size: 13px;
}
}
@media (max-width: 1300px) {
.banner_phone {
width: 636px;
margin-top: 200px;
}
.features-text {
padding: 25px ;
}
.features-text h3 {
font-size: 21px;
}
}
@media (max-width: 1223px) {
.features-text {
padding: 20px ;
}
}
@media (max-width: 1200px) {
.banner_phone {
width: 536px;
}
.features-list .owl-item {
width: calc(50%) !important;
}
.features-text {
padding: 20px 60px !important;
}
}
@media (max-width: 1100px) {
.banner_phone {
width: 416px;
}
}
@media (max-width: 991px) {
.banner .content {
text-align: center;
}
.banner_phone {
display: none;
}
.header .wrapper .menu {
background-color: #fff;
position: fixed;
top: 0;
right: 0;
height: 100%;
width: 200px;
z-index: 99 !important;
padding: 20px;
-webkit-transition: 0.3s;
transition: 0.3s;
-webkit-transform: translateX(100%);
transform: translateX(100%);
}
.header .wrapper .menu ul {
margin-top: 50px;
}
.header .wrapper .menu ul li {
margin-bottom: 20px;
}
.header .wrapper .menu ul li a {
color: #000 !important;
font-size: 17px;
letter-spacing: 2px;
margin-left: 0;
}
.header .wrapper .menu_open {
-webkit-transform: translateX(0%);
transform: translateX(0%);
z-index: 999 !important;
margin-right: 0 !important;
height: 100%;
}
.menu ul li {
display: block !important;
}
.menu ul li a {
color: red !important;
}
.menu:last-child a {
background: none !important;
padding: 0 !important;
color: #fff !important;
}
.hamburger.is-active {
margin-right: 200px !important;
color: #fff;
}
.hamburger_wrapper {
display: block;
position: fixed;
top: 28px;
right: 46px;
z-index: 100;
mix-blend-mode: difference;
}
.bg_show {
display: block;
opacity: 0.4;
z-index: 98;
}
}
@media (max-width: 610px) {
.banner_main_text h1 {
font-size: 40px;
margin-bottom: 25px;
}
.banner_main_text_2 {
font-size: 13px;
margin-bottom: 20px !important;
}
.desc li {
font-size: 13px;
}
.desc li:before {
margin-right: 15px;
}
}
@media (max-width: 520px) {
.wrapper {
padding: 0 30px 0 30px;
}
.banner_main_text h1 {
font-size: 40px;
}
.hamburger.is-active {
margin-right: 220px !important;
z-index: 1000 !important;
}
.hamburger_wrapper {
right: 18px;
}
}
@media (max-width: 480px) {
.banner_main_text h1 {
font-size: 35px;
line-height: 40px;
}
.banner_main_text_2 {
margin-bottom: 25px !important;
}
}
@media (max-width: 450px) {
a.start {
font-size: 12px;
}
}
@media (max-width: 436px) {
.banner_main_text h1 {
font-size: 30px;
}
}
@media (max-width: 390px) {
.banner_main_text h1 {
font-size: 28px;
}
}
@media (max-width: 372px) {
.banner_main_text h1 {
font-size: 26px;
}
} |
|
|
Комментарий модератора |
 |
Коды программ должны находиться на форуме! (Правила п.4.11) |
|
0
|