Сетка CSS с плавающей точкой, не работает, если класс, который устанавливает ширину, не первый

Как насчет включения всего скрипта в цикл while? Например,

while :
do
    script
done

Возможно, вы захотите добавить условие для выхода из цикла.

0
задан user3541631 16 January 2019 в 13:15
поделиться

1 ответ

.red, .blue {
  color: white;
  height: 100px;
}

.red {
background-color: red;
}

.blue {
background-color: blue;

}

.row{ 

  width: 100%;
  overflow: auto;
 }
 
.row::after {
  content: "";
  clear: both;
  display: table;
}

[class*="col-"] {
    float: left;
}

.col-3 {
    width: 30%;
}


.col-7 {
    width: 70%;
}
<div class="row">
  <h1> Example 1</h1> 
  <div class="col-3 red">lorem ipsum</div>
  <div class="col-7 blue">ipsum ipsum</div>
</div>  

<div class="row">
  <h1> Example 2</h1> 
  <div class="red col-3">lorem ipsum</div>
  <div class="blue col-7">ipsum ipsum</div>
</div>  

// вот и все ...

0
ответ дан fatihdurna 16 January 2019 в 13:15
поделиться
Другие вопросы по тегам:

Похожие вопросы: