【发布时间】:2020-04-27 19:28:41
【问题描述】:
我正在尝试将引导手风琴上的加减号图标移动到最右边的位置,但我的代码似乎不起作用。
这是过去的 CSS:
.mb-0 > a:before {
float: right !important;
font-family: FontAwesome;
content:"\f068";
padding-right: 5px;
}
.mb-0 > a.collapsed:before {
float: right !important;
content:"\f067";
}
.mb-0 > a:hover,
.mb-0 > a:active,
.mb-0 > a:focus {
text-decoration:none;
}
这是 HTML 部分:
<div class="accordion" id="accordionExample" style="margin-top: 3%;">
<div class="card">
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<a class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
1. Human Growth and development
</a>
</h2>
</div>
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
<div class="card-body">
<p>Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development. It is a collection of CSS and HTML conventions.</p>
</div>
</div>
</div>
我想要类似于此处显示的示例:JSfiddle
【问题讨论】:
-
仅供参考,您的小提琴对我没有任何用处,因为我的浏览器阻止了您嵌入到通过 HTTPS 提供的页面中的所有不安全资源。
-
嗨@nick,您似乎已经发布了 11 个问题。除了一个以外,所有的答案都已得到回答,但您从未接受过答案。如果答案解决了您的问题,您应该使用答案旁边的复选标记将其标记为正确。见What should I do when someone answers my question?
标签: html css twitter-bootstrap-3