小编nik*_*iko的帖子

bulma列中的中心内容

我有多列。每列在CSS的中心都有一个字体超棒的图标,其中包含一个圆圈。现在,我想使圆本身在列的中间对齐。但是,当文本本身居中时,它始终保持在左侧。

的HTML

<div class="features">
  <div class="container">
    <div class="columns is-mobile ">
      <div class="column">
        <div class="community">
          <font-awesome-icon col size="2x" :icon="['fas', 'tasks']" />
        </div>
        Features
      </div>
    </div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

的CSS

.features {
  background: #2a3a4c;
  height: 200px;
}

.community {
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, #b15757 0%, #b96868 100%);
  border-radius: 100%;
  text-align: center;
  vertical-align: middle;
  display: table-cell;
}
Run Code Online (Sandbox Code Playgroud)

html css css3 bulma

4
推荐指数
2
解决办法
9211
查看次数

标签 统计

bulma ×1

css ×1

css3 ×1

html ×1