@Eldenhard

Как сделать, чтобы при уменьшении экрана до мобильной версии блоки становились друг под друга по 2 штуки в ряд?

<div class = "row">
                <div class="col-md-4" style="background: radial-gradient(rgba(0,0,0,0.1),rgba(0,0,0,0.5)),url('/static/Airpiort.jpg');height:425px;">
                    <font size="6" face="lucida console" class="divclass" style="color:#ffffff; font-weight:800; padding-left:5%">С заботой </font>
                                  <p class="divclass" style="color: #E4E4E4;padding-left:5%; font-size: 28px; font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;">о ваших клиентах</p>
                                      <button class="open" data-modal="modal1">Подробнее</button>
                                          <div id="modal1" class="modal">
                                                <div class="modal-content" style="background: rgba(150, 182, 207, 1);">
                                                      <span class="close" data-modal="modal1">&times;</span>
                                                          <div class = "row">
                                                            <div class="col-md-12" style="text-align:center;">
                                                              <font size="6" face="arial black"  style="color:#ffffff;">BRANDNETWORK.</font>
                                                              <font size="6" face="arial black"  style="color:#000000; font-variant: small-caps; font-weight:bold">customers</font>
                                                            </div>
                                                          </div>  
                                                          <div class = "row">
                                                            <div class="col-md-12" style="background-color: #ffffff; height:1px;width:100%;">
                                                              lorem*30
                                                            </div>
                                                          </div>
                                              </div>
                                            </div>
                    </div>
                    <div class="col-md-4" style="background: radial-gradient(rgba(0,0,0,0.1),rgba(0,0,0,0.5)),url('/static/Airport2.jpg');height:425px;">
                    <font size="6" face="lucida console" class="divclass" style="color:#ffffff; font-weight:800;  padding-left:5%;">Artificial Intelligence</font>
                                  <p class="divclass" style="color: #E4E4E4; font-size: 28px;  padding-left:5%; font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;">на благо логистики</p>
                                      <button class="open" data-modal="modal1">Подробнее</button>
                                          <div id="modal1" class="modal">
                                                <div class="modal-content" style="background: rgba(150, 182, 207, 1);">
                                                      <span class="close" data-modal="modal1">&times;</span>
                                                          <div class = "row">
                                                            <div class="col-md-12" style="text-align:center;">
                                                              <font size="6" face="arial black"  style="color:#ffffff;">BRANDNETWORK.</font>
                                                              <font size="6" face="arial black"  style="color:#000000; font-variant: small-caps; font-weight:bold">AI</font>
                                                            </div>
                                                          </div>
                                                          <div class = "row">
                                                            <div class="col-md-12" style="background-color: #ffffff; height:1px;width:100%;">
                                                              lorem*30
                                                            </div>
                                                          </div>
                                              </div>
                                            </div>
                    </div>
                    <div class="col-md-4" style="background: radial-gradient(rgba(0,0,0,0.1),rgba(0,0,0,0.5)),url('/static/PlaneMany.jpg');height:425px;">
                    <font size="6" class="divclass" face="lucida console"  style="color:#ffffff; font-weight:800; padding-left:5%; ">Взгляд сверху</font>
                                  <p class="divclass" style="color: #E4E4E4; font-size: 28px; padding-left:5%; font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;">упорядочиваем хаос</p>
                                      <button class="open" data-modal="modal1">Подробнее</button>
                                          <div id="modal1" class="modal">
                                                <div class="modal-content" style="background: rgba(150, 182, 207, 1);">
                                                      <span class="close" data-modal="modal1">&times;</span>
                                                          <div class = "row">
                                                            <div class="col-md-12" style="text-align:center;">
                                                              <font size="6" face="arial black"  style="color:#ffffff;">BRANDNETWORK.</font>
                                                              <font size="6" face="arial black"  style="color:#000000; font-variant: small-caps; font-weight:bold">blockchain</font>
                                                            </div>
                                                          </div>
                                                          <div class = "row">
                                                            <div class="col-md-12" style="background-color: #ffffff; height:1px;width:100%;">
                                                              lorem*30
                                                            </div>
                                                          </div>
                                              </div>
                                            </div>
                    </div>
                    
</div>


font.divclass{
     position: relative;
     top: 30px;
 }
 p.divclass{
     position:relative;
     top: 30px;
 }
      .img-card{
      cursor: pointer;
      }
      .img-card img{
      object-fit: cover;
      }
      .content{
      position: absolute;
      top: 0;
      left: 0;
      justify-content: center;
      align-items: center;
      text-align:center;
      padding-top: 25%;
      }
      

  .modal{
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}
.open{
       margin-bottom: 100px;
      background-color: rgba(165, 165, 165, 0.4);
  text-decoration: none;
  font-size: 22px;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  cursor: pointer;
  border: 1px solid white;
}


.modal-content{
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    width: 60%;

}
.close{
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
button.open {
  /* display: block; */
  position: relative;
  top: 240px;
  left: 32px;
  bottom: 15px;
   color: white;
   
   }
button.open:hover {
 border: 1px solid #ED2028;
 color: white;
 background-color: #ED2028;
}
span.close {
  font-size: 30px;
   cursor: pointer;
 
   }
  • Вопрос задан
  • 812 просмотров
Пригласить эксперта
Ответы на вопрос 2
approximate_solution
@approximate_solution
JS Developer. Angular\React\Vue\Ember
media screen and (max-width: 600px) { --// задаете нужное значение для адаптива
display: flex для родителя; // флекс для родителя
flex-wrap: wrap; // перенос блоков
flex-basis: 50% или width: 50% для потомков // блоки выстраиваются по 2 в ряд
}
Ответ написан
Комментировать
webrevenue
@webrevenue
Веб-дизайнер и SEO оптимизатор
class="col-md-4 col-6"
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы