gpt4 book ai didi

css - 舍入 Bootstrap 3 旋转木马 Angular

转载 作者:技术小花猫 更新时间:2023-10-29 10:55:56 25 4
gpt4 key购买 nike

我正在尝试使用 CSS 为 Bootstrap 3 旋转木马设置圆 Angular 样式。我能够将旋转木马中图像的 Angular 变圆,但由于某种原因,背景旋转木马边缘仍未圆 Angular 。我在这里做错了什么? enter image description here

<style type="text/css">
.carousel {
border-radius: 55px 55px 55px 55px;
height: 500px;
margin-bottom: 60px;
margin-top: 40px;
margin-left: 200px;
margin-right: 200px;
}
/* Since positioning the image, we need to help out the caption */
.carousel-caption {
z-index: 10;
}
/* Declare heights because of positioning of img element */
.carousel .item {
width: 100%;
height: 500px;
background-color: #777;
}
.carousel-inner > .item > img {
position: absolute;
top: 0;
left: 0;
min-width: 100%;
height: 500px;
}
@media (min-width: 768px) {
.carousel-caption p {
margin-bottom: 20px;
font-size: 21px;
line-height: 1.4;
}
}
img {
border-radius: 55px 55px 55px 55px;
}
</style>

<div id="carousel" class="carousel slide" data-ride="carousel" data-interval="30000" data-pause="hover">
<!-- Menu -->
<ol class="carousel-indicators">
<li data-target="#carousel" data-slide-to="0" class="active"></li>
<li data-target="#carousel" data-slide-to="1"></li>
<li data-target="#carousel" data-slide-to="2"></li>
</ol>

<!-- Items -->
<div class="carousel-inner">

<div class="item active">
<img src="images/image3.jpg" alt="Slide 1" />
</div>
<div class="item">
<img src="images/image7.jpg" alt="Slide 2" />
</div>
<div class="item">
<img src="images/image6.jpg" alt="Slide 3" />
</div>
</div>
<a href="#carousel" class="left carousel-control" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a href="#carousel" class="right carousel-control" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>

最佳答案

你需要 overflow hidden :

.carousel {
border-radius: 55px 55px 55px 55px;
overflow: hidden;
...
}

关于css - 舍入 Bootstrap 3 旋转木马 Angular ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25428918/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com