小编Pau*_*ula的帖子

是什么导致我的文本在桌面上居中对齐?

我在此页面上使用 Bootstrap 4 的手风琴,手风琴最后一项的文本居中。我没有使用text-center也没有 CSS 属性,text-align: center所以我不知道是什么导致了这种情况。手风琴的所有文本仅以移动设备为中心,而不是桌面设备。

在此处输入图片说明

我的代码:

.accordion-faq .card {
  border-radius: 0;
  border: 1px solid #F1F5F7;
  border-right: none;
  border-left: none;
  text-align: left;
}

.accordion-faq .card-header {
  background-color: white;
  border-bottom: none;
}

.accordion-faq .card-header button {
  color: #0074e1;
  padding-left: 0;
  font-size: 0.9em;
}

.accordion-faq .card-header h5 button::after {
  content: '\f107';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: #0074e1;
  position: absolute;
  right: 35px;
  top: 19px;
}

.accordion-faq .card-header h5 button[aria-expanded="true"]:after {
  content: '\f077';
  font-family: 'Font Awesome …
Run Code Online (Sandbox Code Playgroud)

html css bootstrap-4

6
推荐指数
1
解决办法
93
查看次数

标签 统计

bootstrap-4 ×1

css ×1

html ×1