css列,正确的实现方式?

问题描述 投票:-1回答:1

我想实现下面的设计,但是我在职位上遇到麻烦,任何人都可以在下面给出基本的CSS示例和示例图像的实现吗?帮助将不胜感激。谢谢。我们将为此使用col吗?我们如何根据设计分隔文本?

enter image description here

html css sass less
1个回答
0
投票

使用bootstrap的简单示例:

.col {
  background-color: red;
}

#icon{
  background-color: green;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">

<div class="row">
  <div class="col m-2">
    <div class="row">
      <div id="icon" class="col-4">
        ICON
      </div>
      <div class="col-8">
        <h3>
          Unmuted
        </h3>
        <p>
          Panacast
        </p>
      </div>
    </div>
  </div>
  <div class="col m-2">
    <div class="row">
      <div id="icon" class="col-4">
        ICON
      </div>
      <div class="col-8">
        <h3>
          Unmuted
        </h3>
        <p>
          Panacast
        </p>
      </div>
    </div>
  </div>
</div>
© www.soinside.com 2019 - 2024. All rights reserved.