Html -- 通知插件 toastr

1、html 內容

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <link rel="stylesheet" type="text/css" href="../plugins/toastr/toastr.min.css"/>
        <script src="../plugins/jquery/jquery-3.4.1.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="../plugins/toastr/toastr.min.js" type="text/javascript" charset="utf-8"></script>
    </head>
    <body>
    </body>
    <script type="text/javascript">
        toastr.options = {
            closeButton: true,  //是否顯示關閉按鈕  
            progressBar: true,  //顯示關閉的進度
            
            //toast-bottom-right、toast-bottom-left、toast-top-left、toast-top-full-width、toast-bottom-full-width
            //toast-top-center、toast-bottom-center
            positionClass: "toast-top-center",
            
            //顯示時間長度
      timeOut: "1000",
      
      showEasing: "linear", //顯示時的動畫緩衝方式
      hideEasing: "linear", //消失時的動畫緩衝方式
      showMethod: "fadeIn", //顯示時的動畫方式
      hideMethod: "fadeOut" //消失時的動畫方式
        }
        
    toastr.success("連接已建立,可以進行通信!")
    toastr.success("連接已建立,可以進行通信!", "成功")
    toastr.info("請先登錄!")
    toastr.warning("連接建立失敗,請重試!")
    toastr.error("連接不能打開!");
    
//   toastr.clear();
    </script>
</html>

 

發佈了100 篇原創文章 · 獲贊 20 · 訪問量 1萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章