當前位置:
首頁 > 知識 > Foundation 提醒框

Foundation 提醒框

Foundation 可以很簡單的創建一個提醒框:

Foundation 提醒框

提醒框可以使用 .alert-box 類創建, 可以添加可選的類: .secondary, .success, .info, .warning.alert:

實例

<div data-alert class="alert-box">

This is a default alert box.

</div>

<div data-alert class="alert-box secondary">

This is a secondary alert box.

</div>

<div data-alert class="alert-box success">

<strong>Success!</strong> This alert box indicates a successful or positive action.

</div>

<div data-alert class="alert-box info">

<strong>Info!</strong> This alert box indicates a neutral informative change or action.

</div>

<div data-alert class="alert-box warning">

<strong>Warning!</strong> This alert box indicates a warning that might need attention.

</div>

<div data-alert class="alert-box alert">

<strong>Alert!</strong> This alert box indicates a dangerous or potentially negative action.

</div>

Foundation 提醒框



圓角提醒框

.radius.round 類用於為提醒框添加圓角:

實例

<div data-alert class="alert-box success radius">

<strong>Success!</strong> Alert box with a radius.

</div>

<div data-alert class="alert-box info round">

<strong>Info!</strong> Alert box that is rounded.

</div>

Foundation 提醒框



關閉提醒框

要關閉提醒框,可以在連接或按鈕元素上添加 class="close" 類,並初始化 Foundation JS:

實例

<div data-alert class="alert-box">

This is a default alert box with closing functionality.

<a href="#" class="close">&times;</a>

</div>

<script>

// Initialize Foundation JS For Functionality

$(document).ready(function() {

$(document).foundation();

})

</script>

Foundation 提醒框

提醒框的寬度為容器的 100%。

&times; (×) 是一個 HTML 字元實體表示一個關閉按鈕的圖標,而不是字母 "x"。

喜歡這篇文章嗎?立刻分享出去讓更多人知道吧!

本站內容充實豐富,博大精深,小編精選每日熱門資訊,隨時更新,點擊「搶先收到最新資訊」瀏覽吧!


請您繼續閱讀更多來自 程序員小新人學習 的精彩文章:

Foundation 標籤
Font Awesome 圖標
Foundation5 編程
Foundation 起步
Foundation 文本

TAG:程序員小新人學習 |

您可能感興趣

該怎麼玩兒?The Foundation of Learning
粉底測評#Dior forever undercover 24h foundation
PH7現場 Blue Foundation
mac fix studio foundation nc15 and嘮嗑哈哈哈
蘋果 FoundationDB 開源 CloudKit 使用的數據層
Royal Foundation懷孕時尚抓拍欣賞
Unity:AR Foundation將支持ARKit 3
世界智能駕駛挑戰賽:AutoCore受邀代表Autoware Foundation參賽
阿什莉·比克頓將參展K11 Art Foundation群展Emerald City
Unity AR Foundation開始支持ARKit 3.0
滑板 | Foundation壓軸滑手Cole Wilson-滑板的一天!
Apple的雲資料庫FoundationDB現在開源
大健康鏈BHIC獲得Misitour foundation千萬美元戰略投資
蘋果開源NoSQL 資料庫FoundationDB
CoreLink推出Foundation 3D列印鈦金屬植入體多孔籠式系統
重磅!羅氏24億美元收購Foundation Medicine
如何看待FoundationDB資料庫發展前景?
Unity為iOS和安卓打造AR開發軟體:AR Foundation
三言財經與Global Blockchain Foundation達成戰略合作,成為其中國首家戰略合作媒體
羅氏155億與Foundation Medicine達成併購協議,全面進軍癌症基因檢測行業!