есть слайдер, скачанный. я пытался играться с отступами, но выходит не то. он никак не хочет идти в центр
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Home page</title>
<link rel="stylesheet" href="css/style.css">
<link type="text/css" rel="stylesheet" href="css/lightslider.css" />
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="lightslider.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#lightSlider").lightSlider({
item: 1, //+
autoWidth: false,//+
slideMove: 1, //+
slideMargin: 0,//+
addClass: '',
mode: "slide",
useCSS: true,
cssEasing: 'ease', //'cubic-bezier(0.25, 0, 0.25, 1)',//
easing: 'linear', //'for jquery animation',////
speed: 500, //+
auto: true,
loop: true,//+
slideEndAnimation: true,
pause: 2000,
keyPress: false,
controls: true,
prevHtml: '',
nextHtml: '',
rtl:false,//+
adaptiveHeight:false,//+
vertical:false,
verticalHeight:500,
vThumbWidth:100,
thumbItem:10,
pager: false,
gallery: false,
galleryMargin: 5,
thumbMargin: 5,
currentPagerPosition: 'middle',
enableTouch:true,
enableDrag:true,
freeMove:true,
swipeThreshold: 40,
responsive : [{breakpoint:800, settings:{
slideMargin:0
}}, {breakpoint: 400, settings:{
}}],
onBeforeStart: function (el) {},
onSliderLoad: function (el) {},
onBeforeSlide: function (el) {},
onAfterSlide: function (el) {},
onBeforeNextSlide: function (el) {},
onBeforePrevSlide: function (el) {}
});
});
</script>
</head>
<body>
<header>
<a href="#" title="Home page" class="logo"><!-- <img src="img/logo.png" height="70px" class="logo"> --></a>
<ul class="mu">
<li><a href="#">ABOUT<a></li>
<li><a href="#">HELP</a></li>
<li><a href="#">CART</a></li>
</ul>
<ul class="md">
<li><a href="#">SOLD</a></li>
<li><a href="#">KIDS</a></li>
<li><a href="#">MENS</a></li>
<li><a href="#">WOMENS</a></li>
</ul>
<input type="text" name="search" class="search" placeholder="Enter product for searching" required accesskey="z" size="30" >
<a href="#" class="search_icon"><!-- <img src="img/search.png" alt="searching" width="30"> --></a>
<a href="#" class="user_icon"><!-- <img src="img/user.png" alt="login" width="30"> --></a>
</header>
<content>
<ul id="lightSlider">
<li>
<img src="img/slide.jpg">
</li>
<li>
<img src="img/slide-1.jpg">
</li>
<li>
<img src="img/slide-2.jpg">
</li>
<li>
<img src="img/slide-3.jpg">
</li>
<li>
<img src="img/slide-4.jpg">
</li>
<li>
<img src="img/slide-5.jpg">
</li>
<li>
<img src="img/slide-6.jpg">
</li>
<li>
<img src="img/slide-7.jpg">
</li>
</ul>
</content>
</body>
</html>
Код:
|
/*! lightslider - v1.1.3 - 2015-04-14
* https://github.com/sachinchoolur/lightslider
* Copyright (c) 2015 Sachin N; Licensed MIT */
/** /!!! core css Should not edit !!!/**/
.lSSlideOuter {
overflow: hidden;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
.lightSlider:before, .lightSlider:after {
content: " ";
display: table;
}
.lightSlider {
overflow: hidden;
margin-top: 20px;
margin-left: 200px;
}
.lSSlideWrapper {
max-width: 1300px;
overflow: hidden;
position: relative;
}
.lSSlideWrapper > .lightSlider:after {
clear: both;
}
.lSSlideWrapper .lSSlide {
-webkit-transform: translate(0px, 0px);
-ms-transform: translate(0px, 0px);
transform: translate(0px, 0px);
-webkit-transition: all 1s;
-webkit-transition-property: -webkit-transform,height;
-moz-transition-property: -moz-transform,height;
transition-property: transform,height;
-webkit-transition-duration: inherit !important;
transition-duration: inherit !important;
-webkit-transition-timing-function: inherit !important;
transition-timing-function: inherit !important;
}
.lSSlideWrapper .lSFade {
position: relative;
}
.lSSlideWrapper .lSFade > * {
position: absolute !important;
top: 0;
left: 0;
z-index: 9;
margin-right: 0;
width: 100%;
}
.lSSlideWrapper.usingCss .lSFade > * {
opacity: 0;
-webkit-transition-delay: 0s;
transition-delay: 0s;
-webkit-transition-duration: inherit !important;
transition-duration: inherit !important;
-webkit-transition-property: opacity;
transition-property: opacity;
-webkit-transition-timing-function: inherit !important;
transition-timing-function: inherit !important;
}
.lSSlideWrapper .lSFade > *.active {
z-index: 10;
}
.lSSlideWrapper.usingCss .lSFade > *.active {
opacity: 1;
}
/** /!!! End of core css Should not edit !!!/**/
/* Pager */
.lSSlideOuter .lSPager.lSpg {
margin: 10px 0 0;
padding: 0;
text-align: center;
}
.lSSlideOuter .lSPager.lSpg > li {
cursor: pointer;
display: inline-block;
padding: 0 3px;
}
.lSSlideOuter .lSPager.lSpg > li a {
background-color: #222222;
border-radius: 30px;
display: inline-block;
height: 8px;
overflow: hidden;
text-indent: -999em;
width: 8px;
position: relative;
z-index: 99;
-webkit-transition: all 0.5s linear 0s;
transition: all 0.5s linear 0s;
}
.lSSlideOuter .lSPager.lSpg > li:hover a, .lSSlideOuter .lSPager.lSpg > li.active a {
background-color: #ff8b34;
}
.lSSlideOuter .media {
opacity: 0.8;
}
.lSSlideOuter .media.active {
opacity: 1;
}
/* End of pager */
/** Gallery */
.lSSlideOuter .lSPager.lSGallery {
list-style: none outside none;
padding-left: 0;
margin: 0;
overflow: hidden;
transform: translate3d(0px, 0px, 0px);
-moz-transform: translate3d(0px, 0px, 0px);
-ms-transform: translate3d(0px, 0px, 0px);
-webkit-transform: translate3d(0px, 0px, 0px);
-o-transform: translate3d(0px, 0px, 0px);
-webkit-transition-property: -webkit-transform;
-moz-transition-property: -moz-transform;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.lSSlideOuter .lSPager.lSGallery li {
overflow: hidden;
-webkit-transition: border-radius 0.12s linear 0s 0.35s linear 0s;
transition: border-radius 0.12s linear 0s 0.35s linear 0s;
}
.lSSlideOuter .lSPager.lSGallery li.active, .lSSlideOuter .lSPager.lSGallery li:hover {
border-radius: 5px;
}
.lSSlideOuter .lSPager.lSGallery img {
display: block;
height: auto;
max-width: 80%;
}
.lSSlideOuter .lSPager.lSGallery:before, .lSSlideOuter .lSPager.lSGallery:after {
content: " ";
display: table;
}
.lSSlideOuter .lSPager.lSGallery:after {
clear: both;
}
/* End of Gallery*/
/* slider actions */
.lSAction > a {
width: 32px;
display: block;
top: 50%;
height: 32px;
background-image: url('../img/controls.png');
cursor: pointer;
position: absolute;
z-index: 99;
margin-top: -16px;
opacity: 0.5;
-webkit-transition: opacity 0.35s linear 0s;
transition: opacity 0.35s linear 0s;
}
.lSAction > a:hover {
opacity: 1;
}
.lSAction > .lSPrev {
background-position: 0 0;
left: 10px;
}
.lSAction > .lSNext {
background-position: -32px 0;
right: 10px;
}
.lSAction > a.disabled {
pointer-events: none;
}
.cS-hidden {
height: 1px;
opacity: 0;
filter: alpha(opacity=0);
overflow: hidden;
}
/* vertical */
.lSSlideOuter.vertical {
position: relative;
}
.lSSlideOuter.vertical.noPager {
padding-right: 0px !important;
}
.lSSlideOuter.vertical .lSGallery {
position: absolute !important;
right: 0;
top: 0;
}
.lSSlideOuter.vertical .lightSlider > * {
width: 100% !important;
max-width: none !important;
}
/* vertical controlls */
.lSSlideOuter.vertical .lSAction > a {
left: 50%;
margin-left: -14px;
margin-top: 0;
}
.lSSlideOuter.vertical .lSAction > .lSNext {
background-position: 31px -31px;
bottom: 10px;
top: auto;
}
.lSSlideOuter.vertical .lSAction > .lSPrev {
background-position: 0 -31px;
bottom: auto;
top: 10px;
}
/* vertical */
/* Rtl */
.lSSlideOuter.lSrtl {
direction: rtl;
}
.lSSlideOuter .lightSlider, .lSSlideOuter .lSPager {
padding-left: 0;
list-style: none outside none;
}
.lSSlideOuter.lSrtl .lightSlider, .lSSlideOuter.lSrtl .lSPager {
padding-right: 0;
}
.lSSlideOuter .lightSlider > *, .lSSlideOuter .lSGallery li {
float: left;
}
.lSSlideOuter.lSrtl .lightSlider > *, .lSSlideOuter.lSrtl .lSGallery li {
float: right !important;
} |