删除箭头轮播引导程序附近的可点击区域

pex*_*hdu 1 html css arrows carousel twitter-bootstrap

我使用Carousel bootstrap进行幻灯片放映,我只想点击确切的箭头图标来移动幻灯片,但问题是它可以让你点击箭头附近的任何地方(上方和下方),有什么方法我可以调整它只能在箭头上单击.我做了下面的代码,以删除已经看到阴影的黑暗区域.谢谢

 .carousel-control.left, .carousel-control.right {
   filter: progid: none !important;
   filter:none !important;
   background-image:none;
   outline: 0;
   opacity: 1;
 }
Run Code Online (Sandbox Code Playgroud)

Vij*_*vai 5

只有你必须把顶部:50%; 和底部:50%; 这个问题将得到解决.:)

对于Bootstrap 3:

#myCarousel .carousel-control{
    top: 50%;
    bottom: 50%;
}
Run Code Online (Sandbox Code Playgroud)

对于Bootstrap 4:

#myCarousel  .carousel-control-prev, 
#myCarousel  .carousel-control-next{
    top: 50%;
    bottom: 50%;
}
Run Code Online (Sandbox Code Playgroud)

并且不要忘记将#myCarousel id 更改为您的carousal ID或类选择器.