简体   繁体   English

在幻灯片内移动漂亮的导航箭头

[英]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.

相关问题 元素内部的光滑轮播箭头 - Slick carousel arrows on inside of element 光滑的滑块将分页移动到幻灯片上方 - Slick Slider Move Pagination Above Slides 在幻灯片内容中添加光滑箭头 - Append slick arrows inside the slide content 如何在圆点列表内附加圆滑箭头? - How to append slick arrows inside the dots list? 当显示的幻灯片总数和幻灯片总数相等并且滑块也不滑动时,隐藏滑动滑块箭头 - Slick slider arrows hidden when total number of slides and slides shown are equal and the slider is not sliding also 隐藏/显示内容取决于是否显示平滑的导航箭头 - Hide/display content depending on whether Slick navigation arrows are showing 将 Slick 旋转木马导航箭头与幻灯片图像而不是其下方的文本垂直对齐 - Vertically align Slick carousel navigation arrows with slide image and not the text beneath it Slick slider 使用数据属性将带有幻灯片的导航项分组 - Slick slider group navigation items with slides using data attributes 如何在垂直滑动条中同步滑动条中的主滑动条和垂直滑动条的箭头(上一个和下一个)保持相等的高度? - How to maintain an equal height of main slide and the vertical slides with the arrows(prev and next) in Vertical slider syncing in slick slider? Slick Slider 2 滑块与 Bootstrap Modal 内的 Slider 和 Slider 不匹配 - Slick Slider 2 sliders not matching slides and Slider inside Bootstrap Modal
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM