【发布时间】:2021-04-05 08:49:51
【问题描述】:
在 Bootstrap 4 中,我理解它将默认文本装饰设置为无。
但是使用 Bootstrap 5 如果我只是添加一个原始锚标记,它现在同时显示蓝色文字和下划线。
我希望只在悬停时显示 undelrine。这是 bootstrap 5 在发行版中更改的内容吗?我找不到任何说明它的文档。
目前我使用:
a {
text-decoration: none;
color: inherit;
}
a:hover {
text-decoration: underline;
color: inherit
}
但这也会影响任何按钮作为链接,例如
<a href="{% url 'answer-create' question.id %}" class="btn btn-outline-dark mr-2 py-0">Answer</a>
【问题讨论】:
标签: html bootstrap-4 bootstrap-5