小编spo*_*nag的帖子

Bootstrap 5 下划线默认更改?

在 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)

html bootstrap-4 bootstrap-5

2
推荐指数
3
解决办法
1876
查看次数

标签 统计

bootstrap-4 ×1

bootstrap-5 ×1

html ×1