html - 如何在右侧制作带有标题的 Bootstrap 轮播?

标签 html css twitter-bootstrap twitter-bootstrap-3


我试图使标题位于右侧。但是,它只是在左侧对齐。

CSS:

#jumboCarousel {
    margin-top: 70px;
    min-height: 300px;
    max-height: 600px;
    min-width: 100%;
}
#jumboCarousel img {
    min-height: 300px;
  max-height: 600px;
    min-width: 100%;
}
#jumboCarousel > .carousel-indicators > li {
    border-radius: 0px;
    min-width: 25px;
    background-color: #9d9d9d;
    border: 1px solid black;
    margin-right: 10px;;
    margin-left: 10px;;
}
#jumboCarousel > .carousel-indicators > .active {
    background-color: orange;
}
#jumboCarousel .carousel-caption {
    color: white;
    xright: 58%;
    text-align: center;
    max-width: 300px;
    right: 0;
    top: 1px;
  /*top: 50%; */
  xtransform: translateY(-50%);
  xbottom: initial;
  background: rgba(0,0,0,0.5);
  padding:10px;
  height:100%;

}

.item {
    -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
  }

我的问题的代码笔是 https://codepen.io/mrsalami/pen/VdeGYK?editors=1100

最佳答案

只需将 left: auto; 添加到 #jumboCarousel .carousel-caption

#jumboCarousel .carousel-caption {
    color: white;
    text-align: center;
    max-width: 300px;
    right: 0;
    top: 1px;
    xtransform: translateY(-50%);
    xbottom: initial;
    background: rgba(0,0,0,0.5);
    padding: 10px;
    height: 100%;
    left: auto; /*Added*/
}

关于html - 如何在右侧制作带有标题的 Bootstrap 轮播?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50679360/

相关文章:

asp.net - asp :button disappears in IE7, 但留在 IE8 中。为什么?

javascript - 如何在 Bootstrap Material 设计的输入文本中制作标签支持?

javascript - Jquery Mobile 后退按钮不起作用

javascript - 检测具有类名 x 的最后一个 div 并向其添加一个新类 y

html - 无法使用 ionic 滚动水平滚动

html - div 中奇怪的空白问题

html - 无法让 div 的宽度对齐

javascript - 最大高度/最大宽度在 Firefox 和 IE 中不起作用

css - Bootstrap 自定义断点

php - 标准提交按钮提交表单,Bootstrap V3 按钮不会提交表单