Slick.js remove blue highlight around image

故事扮演 提交于 2019-12-04 22:38:37

You need to use outline: none;

Put it on .slick-slide

.slick-slide {
    outline: none
}

Demo

Try this it's work for me. You need to add outline: none; for slick slider a tag

.slick-slide {
  &:focus, a {
    outline: none;
  }
}

I obliterated this using:

.slick-slide, .slick-slide *{ outline: none !important; }

Have you tried to add this into your img tag?: style="border-style: none"/ Try that and see if it works.

If you are using bootstrap, beware that the a:focus settings within that code will also cause that blue border to appear. If you either set your slick-slide to !important or change the bootstrap code to a:focus : none; , this will fix it.

If you are passing a react Component into your slick carousel, i.e.

<Slider {...settings}>
 <CarouselItem/>
</Slider>

I found that I had to apply the outline: none; style to the <CarouselItem/> component, rather than targeting any of the native slick-* classes.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!