Bootstrap4 信息提示框

Bootstrap4 教程 · 2019-03-02 05:58:31

Bootstrap 4 可以很容易实现信息提示框。

提示框可以使用 .alert 类, 后面加上 .alert-success, .alert-info, .alert-warning, .alert-danger, .alert-primary, .alert-secondary, .alert-light.alert-dark 类来实现:

实例
<div class="alert alert-success"> <strong>成功!</strong> 指定操作成功提示信息。 </div>

提示框添加链接

提示框中在链接的标签上添加 alert-link 类来设置匹配提示框颜色的链接:

实例
<div class="alert alert-success"> <strong>成功!</strong> 你应该认真阅读 <a href="#" class="alert-link">这条信息</a></div>

关闭提示框

我们可以在提示框中的 div 中添加 .alert-dismissible 类,然后在关闭按钮的链接上添加 class="close"data-dismiss="alert" 类来设置提示框的关闭操作。

实例
<div class="alert alert-success alert-dismissible"> <button type="button" class="close" data-dismiss="alert">&times;</button> <strong>成功!</strong> 指定操作成功提示信息。 </div>

提示: &times; (×) 是 HTML 实体字符,来表示关闭操作,而不是字母 "x"。

提示框动画

.fade.show 类用于设置提示框在关闭时的淡出和淡入效果:

实例
<div class="alert alert-danger alert-dismissible fade show">

点击查看所有 Bootstrap4 教程 文章: https://codercto.com/courses/l/26.html

查看所有标签

Dynamic Programming

Dynamic Programming

Richard Bellman / Dover Publications / 2003-03-04 / USD 19.95

An introduction to the mathematical theory of multistage decision processes, this text takes a "functional equation" approach to the discovery of optimum policies. The text examines existence and uniq......一起来看看 《Dynamic Programming》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换