亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

目錄 搜索
Bootstrap 基礎(chǔ)教程 Bootstrap 環(huán)境安裝 Bootstrap 教程 Bootstrap CSS Bootstrap CSS 概覽 Bootstrap 按鈕 Bootstrap 表單 Bootstrap 表格 Bootstrap 代碼 Bootstrap 輔助類 Bootstrap 排版 Bootstrap 圖片 Bootstrap 網(wǎng)格系統(tǒng) Bootstrap 網(wǎng)格系統(tǒng)實例:堆疊的水平 Bootstrap 網(wǎng)格系統(tǒng)實例:手機、平板電腦、臺式電腦 Bootstrap 網(wǎng)格系統(tǒng)實例:中型和大型設(shè)備 Bootstrap 響應(yīng)式實用工具 Bootstrap 布局組件 Bootstrap Well Bootstrap 按鈕下拉菜單 Bootstrap 按鈕組 Bootstrap 標(biāo)簽 Bootstrap 超大屏幕(Jumbotron) Bootstrap 導(dǎo)航欄 Bootstrap 導(dǎo)航元素 Bootstrap 多媒體對象(Media Object) Bootstrap 分頁 Bootstrap 徽章(Badges) Bootstrap 進度條 Bootstrap 警告(Alerts) Bootstrap 列表組 Bootstrap 面板(Panels) Bootstrap 面包屑導(dǎo)航(Breadcrumbs) Bootstrap 輸入框組 Bootstrap 縮略圖 Bootstrap 下拉菜單(Dropdowns) Bootstrap 頁面標(biāo)題(Page Header) Bootstrap 字體圖標(biāo)(Glyphicons) Bootstrap 插件 Bootstrap 按鈕(Button) Bootstrap 標(biāo)簽頁(Tab) Bootstrap 插件概覽 Bootstrap 彈出框(Popover) Bootstrap 附加導(dǎo)航(Affix) Bootstrap 滾動監(jiān)聽(Scrollspy) Bootstrap 過渡效果(Transition) Bootstrap 警告框(Alert) Bootstrap 輪播(Carousel) Bootstrap 模態(tài)框(Modal)插件 Bootstrap 提示工具(Tooltip) Bootstrap 下拉菜單(Dropdown) Bootstrap 折疊(Collapse) Bootstrap 附錄 Bootstrap CSS編碼規(guī)范 Bootstrap HTML編碼規(guī)范 Bootstrap UI 編輯器
文字

Bootstrap 警告(Alerts)


本章將講解警告(Alerts)以及 Bootstrap 所提供的用于警告的 class。警告(Alerts)向用戶提供了一種定義消息樣式的方式。它們?yōu)榈湫偷挠脩舨僮魈峁┝松舷挛男畔⒎答仭?/p>

您可以為警告框添加一個可選的關(guān)閉按鈕。為了創(chuàng)建一個內(nèi)聯(lián)的可取消的警告框,請使用 警告(Alerts) jQuery 插件。

您可以通過創(chuàng)建一個 <div>,并向其添加一個 .alert class 和四個上下文 class(即 .alert-success、.alert-info、.alert-warning、.alert-danger)之一,來添加一個基本的警告框。下面的實例演示了這點:

<!DOCTYPE?html>
<html>
<head>
???<title>Bootstrap?實例?-?警告(Alerts)</title>
???<link?href="/bootstrap/css/bootstrap.min.css"?rel="stylesheet">
???<script?src="/scripts/jquery.min.js"></script>
???<script?src="/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>

<div?class="alert?alert-success">成功!很好地完成了提交。</div>
<div?class="alert?alert-info">信息!請注意這個信息。</div>
<div?class="alert?alert-warning">警告!請不要提交。</div>
<div?class="alert?alert-danger">錯誤!請進行一些更改。</div>


</body>
</html>

結(jié)果如下所示:

警告(Alerts)

可取消的警告(Dismissal Alerts)

創(chuàng)建一個可取消的警告(Dismissal Alert)步驟如下:

  • 通過創(chuàng)建一個 <div>,并向其添加一個 .alert class 和四個上下文 class(即 .alert-success、.alert-info、.alert-warning、.alert-danger)之一,來添加一個基本的警告框。
  • 同時向上面的 <div> class 添加可選的 .alert-dismissable。
  • 添加一個關(guān)閉按鈕。

下面的實例演示了這點:

<!DOCTYPE?html>
<html>
<head>
???<title>Bootstrap?實例?-?可取消的警告(Dismissal?Alerts)</title>
???<link?href="/bootstrap/css/bootstrap.min.css"?rel="stylesheet">
???<script?src="/scripts/jquery.min.js"></script>
???<script?src="/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>

<div?class="alert?alert-success?alert-dismissable">
???<button?type="button"?class="close"?data-dismiss="alert"?
??????aria-hidden="true">
??????&times;
???</button>
???成功!很好地完成了提交。
</div>
<div?class="alert?alert-info?alert-dismissable">
???<button?type="button"?class="close"?data-dismiss="alert"?
??????aria-hidden="true">
??????&times;
???</button>
???信息!請注意這個信息。
</div>
<div?class="alert?alert-warning?alert-dismissable">
???<button?type="button"?class="close"?data-dismiss="alert"?
??????aria-hidden="true">
??????&times;
???</button>
???警告!請不要提交。
</div>
<div?class="alert?alert-danger?alert-dismissable">
???<button?type="button"?class="close"?data-dismiss="alert"?
??????aria-hidden="true">
??????&times;
???</button>
???錯誤!請進行一些更改。
</div>


</body>
</html>

請確保使用帶有 data-dismiss="alert" data 屬性的 <button> 元素。

結(jié)果如下所示:

可取消的警告(Dismissal Alerts)

警告(Alerts)中的鏈接

在警告(Alerts)中創(chuàng)建鏈接的步驟如下:

  • 通過創(chuàng)建一個 <div>,并向其添加一個 .alert class 和四個上下文 class(即 .alert-success、.alert-info、.alert-warning、.alert-danger)之一,來添加一個基本的警告框。
  • 使用 .alert-link 實體類來快速提供帶有匹配顏色的鏈接。
<!DOCTYPE?html>
<html>
<head>
???<title>Bootstrap?實例?-?警告(Alerts)中的鏈接</title>
???<link?href="/bootstrap/css/bootstrap.min.css"?rel="stylesheet">
???<script?src="/scripts/jquery.min.js"></script>
???<script?src="/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>

<div?class="alert?alert-success">
???<a?href="#"?class="alert-link">成功!很好地完成了提交。</a>
</div>
<div?class="alert?alert-info">
???<a?href="#"?class="alert-link">信息!請注意這個信息。</a>
</div>
<div?class="alert?alert-warning">
???<a?href="#"?class="alert-link">警告!請不要提交。</a>
</div>
<div?class="alert?alert-danger">
???<a?href="#"?class="alert-link">錯誤!請進行一些更改。</a>
</div>


</body>
</html>

結(jié)果如下所示:

警告(Alerts)中的鏈接
上一篇: 下一篇: