【发布时间】:2016-07-25 20:29:38
【问题描述】:
我遇到了类似于Bootstrap Carousel Caption moves after transition complete 的问题,但我仍然没有解决它阅读/尝试解决方案...
文本(在 .carousel-caption 中)在轮播中的幻灯片转换期间从顶部弹出。我的目标是让它保持在底部附近。我已经修改了轮播上的 CSS,但在某些时候一定搞砸了。我还没有找到它,我在这篇文章之后的最后一招就是重新开始! :D
注意:该问题仅发生在 768 像素以上的浏览器宽度。
你可以在这里查看我的问题:http://wfsu.org/2016copy/education/ 我在 .carousel-caption 上放置了透明背景,以便更容易看到问题。但是,如果您在 .item 上放置背景,这也有效。
这是我对 @media (min-width: 768px) 的轮播相关 CSS 更改
.carousel-caption {
position:absolute!important;
top: inherit!important;
background-color: rgba(0, 0, 0, 0.5);
bottom:0;/*was 20px*/
padding-top:0!important;/*was 20px*/
padding-bottom:10px;/*was 30px*/
padding-right:inherit!important;
padding-left:inherit!important;
right:0!important;/*was 20%*/
left:0!important;/*was 20%*/
background: inherit;
border-bottom: 17px solid $accent-green;
}
低于 768 像素的 CSS 更改为轮播
/*carousel*/
.carousel-control .fa-chevron-circle-left, .carousel-control .fa-chevron-circle-right, .carousel-control .icon-next, .carousel-control .icon-prev {
position: absolute;
top: 50%;
z-index: 5;
display: inline-block;
margin-top: -10px;
}
.carousel-caption {
position: relative;
left: auto;
right: auto;
background:$primary-green;
border-bottom: 17px solid $accent-green;
padding-top:1px;
padding-right:10px;
padding-left:10px;
top: 0;
}
.carousel-control.left, .carousel-control.right {
background-image: none!important;
}
.carousel-indicators {
bottom:-15px;/*was 20px*/
}
谢谢
【问题讨论】:
标签: css twitter-bootstrap carousel