作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个两列布局,标题和 P 位于带有大量 Iframe 视频的 Bootstrap 轮播的左侧。我试图让 iframe 轮播适合其 block 的整个空间。我尝试添加无排水沟但找不到解决方案。我想知道这是否可行,因为 Iframe 已将尺寸设置为 16by9。
<div class="container-fluid p-5 back-test text-light testimonials">
<div class="row justify-content-lg-between text-center">
<div class="col-lg-5 col-md-12 align-self-center ml-lg-4 pr-2 pb-sm-3">
<h1>We're With <span class="you">You</span><br><span class="extra">We Go The Extra Mile</span></h1>
<p>At Here are a few notable testimonials that we would like to share with you.</p>
</div>
<div class="col-lg-6 col-md-12">
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel" data-interval="false">
<div class="carousel-inner">
<div class="carousel-item active">
<div class="embed-responsive embed-responsive-16by9">
<iframe width="560" height="315" src="https://www.youtube.com/embed/-1IHHJmuc78" class="vid-one" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
<div class="carousel-item">
<div class="embed-responsive embed-responsive-16by9">
<iframe width="560" height="315" src="https://www.youtube.com/embed/-1IHHJmuc78" class="vid-one" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
<div class="carousel-item">
<div class="embed-responsive embed-responsive-16by9">
<iframe width="560" height="315" src="https://www.youtube.com/embed/zTiSxfCarPM" class="vid-one" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
最佳答案
.no-gutters
应用于您的 .row
。.container-fluid
包装器。参见 documentation (粗体“需要边到边设计?”)p{side}-{size}
和 m{side}-{size}
类。他们使用 !important
应用 margin
和 padding
。你真的不想要那个。结果:
/* demo purposes */
body:not(#_) {background-color: #888;}
.row {background-color: white;}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row justify-content-lg-between text-center no-gutters">
<div class="col-lg-5 col-md-12 align-self-center">
<h1>We're With <span class="you">You</span><br><span class="extra">We Go The Extra Mile</span></h1>
<p>At Here are a few notable testimonials that we would like to share with you.</p>
</div>
<div class="col-lg-6 col-md-12">
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel" data-interval="false">
<div class="carousel-inner">
<div class="carousel-item active">
<div class="embed-responsive embed-responsive-16by9">
<iframe width="560" height="315" src="https://www.youtube.com/embed/-1IHHJmuc78" class="vid-one" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
<div class="carousel-item">
<div class="embed-responsive embed-responsive-16by9">
<iframe width="560" height="315" src="https://www.youtube.com/embed/-1IHHJmuc78" class="vid-one" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
<div class="carousel-item">
<div class="embed-responsive embed-responsive-16by9">
<iframe width="560" height="315" src="https://www.youtube.com/embed/zTiSxfCarPM" class="vid-one" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
关于jquery - Bootstrap 4 轮播 Iframe 无排水沟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52971175/
我可以以像素为单位放置间距吗? 我试图将像素放入 gutter 变量中,但出现错误。 我做的很简单example . @import "susy"; // Colors // - - - - - -
如果每个项目的宽度为 25% 并且 gutter 参数为 10,为什么我不能按行显示 4 个项目?请帮助我! $('.grid').masonry({ itemSelector: '.grid
我是一名优秀的程序员,十分优秀!