div 및 이미지에 문제가 있습니다. div 안에 내용이있을 때도 겹칩니다. 그리드 시스템에 부트 스트랩을 사용하고 있습니다.div에서 이미지로 div를 중지하는 방법은 무엇입니까?
이 사진은 문제를 보여줍니다
여기 JSFiddle에 내 코드의를
.news-section {
\t height: 500px;
\t background-color: #F1EFEF;
}
.news-title {
\t margin-top: 50px;
\t height: 60px;
\t background-color: #4A90E2;
\t display: inline-block;
\t text-align: center;
}
.news-title > h3 {
\t vertical-align: middle;
}
.videos-title {
\t margin-top: 50px;
\t height: 60px;
\t
\t background-color: #3F444A;
\t color: #fff;
\t display: inline-block;
\t text-align: center;
}
.videos-title > h3 {
\t vertical-align: middle;
}
.news-content {
\t margin-top: 25px;
\t display: inline-block;
}
.videos-content {
\t margin-top: 25px;
\t display: inline-block;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.5/css/bootstrap-flex.css" rel="stylesheet"/>
<section>
<div class="container">
<div class="row">
<div class="news-section">
<div class="col-md-6 col-xs-12 news-title">
<h3>Lo más nuevo</h3>
<div class="news-content">
<img class="img-responsive" src="http://placehold.it/500x400" alt="" >
</div>
</div>
<div class="col-md-6 col-xs-12 videos-title">
<h3>Nuestros videos más nuevos</h3>
<div class="news-content">
<img class="img-responsive" src="http://placehold.it/500x400" alt="" >
</div>
</div>
</div>
</div>
</div>
</section>
동일 할 수있다. 문제를 jsfiddle에게 제공 할 수 있습니까? – Tapu
작업 버전을 추가했는데 문제의 원인이 col-xs-12의'float : left'라는 것을 발견했지만 데스크탑 버전에 영향을주지 않고 삭제하는 방법을 모르겠습니다. –