在 Bootstrap 4 中,我知道它将默认文本装饰设置为无。
但是使用 Bootstrap 5,如果我只是添加一个原始锚标记,它现在会同时显示蓝色文字和下划线。
我希望只在悬停时显示 undelrine。这是 Bootstrap 5 在发布中改变的东西吗?我找不到任何说明它的文件。
目前我使用:
a {
text-decoration: none;
color: inherit;
}
a:hover {
text-decoration: underline;
color: inherit
}
Run Code Online (Sandbox Code Playgroud)
但这也会影响任何按钮作为链接,例如
<a href="{% url 'answer-create' question.id %}" class="btn btn-outline-dark mr-2 py-0">Answer</a>
Run Code Online (Sandbox Code Playgroud)