[英]Move slick navigation arrows inside the slides
How can I move the navigation arrows? 如何移动导航箭头? Would like them to be on the sliders images. 希望它们在滑块图像上。 I have tried everything I could find on the web, no results. 我尝试了所有可以在网上找到的内容,但没有结果。 Using ASP.NET don't think that it matters though. 尽管使用ASP.NET并不重要。 Using the latest SLICK version. 使用最新的SLICK版本。
HTML code: HTML代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Slick.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Slideshow</title>
<link rel="stylesheet" type="text/css" href="slick/slick.css"/>
<link rel="stylesheet" type="text/css" href="slick/slick-theme.css"/>
</head>
<body><div class="slider-for">
<form id="form1" runat="server">
<div class="slider">
<img src="\img\koral.jpg" />
<img src="\img\ships.jpg" />
</div>
</form></div>
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="slick/slick.min.js"></script>
<script type="text/javascript" src="slick/Instellingen.js"></script>
</body>
</html>
My JS settings: 我的JS设置:
$('.slider-for').slick({
slidesToShow: 1,
slidesToScroll: 1,
fade: true,
swipe: false,
accessibility: false,
arrows: false,
});
$(document).ready(function () {
$('.slider').slick({
slide: 'img',
dots: true,
infinite: true,
speed: 300,
arrows: true,
centerMode: true,
variableWidth: true,
autoplay: true,
autoplaySpeed: 2000,
appendArrows: $('img'),
appendDots: $('img')
});
});
EDIT: Found out the problem was that my cache wasn't refreshing.. There is one arrow under the slideshow now, how can i move it to the front? 编辑:发现问题是我的缓存没有刷新..现在幻灯片放映下有一个箭头,我如何将其移到前面?
Try using CSS to move navigation buttons inside slider. 尝试使用CSS在滑块内移动导航按钮。 For example: 例如:
.slick-prev {
left: 25px;
z-index: 1;
}
.slick-next {
right: 25px;
}
.slick-prev:before, .slick-next:before {
color: #000;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.