如何将轮播滚动箭头键放到页面中间

时间:2017-11-17 04:47:52

标签: javascript html css twitter-bootstrap

我在左右两侧有自举旋转木马滚动箭头键。但目前它位于横幅页面的顶部。但我需要把它放在页面的中间位置。我的css类用于箭头键。

.carousel-control.left {margin-left: -85px; color: black;}
.carousel-control.right {margin-right: -85px; color: black;}

如何将我的方向键放在页面中间?

2 个答案:

答案 0 :(得分:1)

添加此内容。

.carousel-control {
position: absolute;
top: 50%; 
z-index: 5;
display: inline-block;
}

样品

http://jsfiddle.net/WmMXa/671/

答案 1 :(得分:0)

<div style="display:table;height: 100vh;width: 100%;">
  <div style="display: table-cell;padding: 0;height: 100vh;vertical-align: middle;text-align: center;">
  <p style="background:red;display:inline-block;padding:50px"> Content </p>
  </div>
</div>