admin管理员组文章数量:1399805
I am putting together a slide presentation using a jquery plugin called 'slick' (/) using django and a bootstrap 3 template. I've got a basic carousel working using a django template that looks like:
<div class="your-class">
<div>your content</div>
<div><IMG src=":ANd9GcSj2c33fdt1ugB8VBuE5V37wnmPoxWMknX9JnGycNiH2yr3BpDKVA"></div>
<div>your content</div>
</div>
I have a fiddle at /
I'm wondering if there is a way to add arrows to the left and right of the slide, like in the first example (Single Item) on / . I can only see the prev and next buttons below the slides
I am putting together a slide presentation using a jquery plugin called 'slick' (http://kenwheeler.github.io/slick/) using django and a bootstrap 3 template. I've got a basic carousel working using a django template that looks like:
<div class="your-class">
<div>your content</div>
<div><IMG src="https://encrypted-tbn2.gstatic./images?q=tbn:ANd9GcSj2c33fdt1ugB8VBuE5V37wnmPoxWMknX9JnGycNiH2yr3BpDKVA"></div>
<div>your content</div>
</div>
I have a fiddle at http://jsfiddle/kc11/20a90mdm/1/
I'm wondering if there is a way to add arrows to the left and right of the slide, like in the first example (Single Item) on http://kenwheeler.github.io/slick/ . I can only see the prev and next buttons below the slides
Share Improve this question asked May 11, 2015 at 17:30 user1592380user1592380 36.5k105 gold badges313 silver badges552 bronze badges3 Answers
Reset to default 2Your arrows are already there, they are the Previous and Next buttons at the bottom of the page. You would need to include slick-theme.css or style them by yourself via css.
Here I try css code...
.slick-prev{
background:#000;
width:50px;
height:50px;
position:absolute;
left:0;
top:50%;
-ms-transform: translateY(-50%); /* IE 9 */
-webkit-transform: translateY(-50%); /* Safari */
transform: translateY(-50%);
}
.slick-next{
background:#000;
width:50px;
height:50px;
position:absolute;
right:0;
top:50%;
-ms-transform: translateY(-50%); /* IE 9 */
-webkit-transform: translateY(-50%); /* Safari */
transform: translateY(-50%);
}
NOTE
Give their parent class
position:relative
Also you can set left & right position as your need.
The color of the buttons in slick-theme.css is white, so not visible on a white background.
Change the color of the buttons there or overwrite in your own style sheet like this:
.slick-prev:before, .slick-next:before {
color: #000000;
}
本文标签: javascripthow to add arrows to Slick sliderStack Overflow
版权声明:本文标题:javascript - how to add arrows to Slick slider - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744167211a2593606.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论