css 栏目,正确的实施方式?
css columns , the right way to implement?
我想实现下面的设计,但是我在位置上遇到了问题,谁能给出一个基本的 css 示例和下面示例图像的实现?真的很感激帮助。谢谢你。我们要为此使用 col 吗?我们如何根据设计分隔文本?
使用 bootstrap
的非常简单的示例:
.col {
background-color: red;
}
#icon {
background-color: green;
}
hr {
border-top-width: 3px !important;
}
.arrow-up {
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 10px solid black;
}
<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
<span class="arrow-up"></span>
</h3>
<hr>
<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
<span class="arrow-up"></span>
</h3>
<hr>
<p>
Panacast
</p>
</div>
</div>
</div>
</div>
我想实现下面的设计,但是我在位置上遇到了问题,谁能给出一个基本的 css 示例和下面示例图像的实现?真的很感激帮助。谢谢你。我们要为此使用 col 吗?我们如何根据设计分隔文本?
使用 bootstrap
的非常简单的示例:
.col {
background-color: red;
}
#icon {
background-color: green;
}
hr {
border-top-width: 3px !important;
}
.arrow-up {
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 10px solid black;
}
<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
<span class="arrow-up"></span>
</h3>
<hr>
<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
<span class="arrow-up"></span>
</h3>
<hr>
<p>
Panacast
</p>
</div>
</div>
</div>
</div>