页面消息提示 – toastr

发布于 2017-01-05  733 次阅读


需要依赖jQuery~
Github:https://github.com/CodeSeven/toastr
官网:http://codeseven.github.io/toastr
Demo:http://codeseven.github.io/toastr/demo.html
查看简单效果请点击阅读全文。

<link type="text/css" href="https://laji.blog/css/toastr.min.css"; rel="stylesheet">
<button id="test-toastr" class="btn success">点击我查看效果</button>
<script src="https://laji.blog/js/jquery-3.1.1.min.js"; type="text/javascript"></script>
<script src="https://laji.blog/js/toastr.min.js";></script>
<script>

toastr.options = {
    "closeButton": true,
    "debug": false,
    "newestOnTop": false,
    "progressBar": true,
    "positionClass": "toast-top-right",
    "preventDuplicates": false,
    "onclick": null,
    "showDuration": "300",
    "hideDuration": "1000",
    "timeOut": "5000",
    "extendedTimeOut": "1000",
    "showEasing": "swing",
    "hideEasing": "linear",
    "showMethod": "fadeIn",
    "hideMethod": "fadeOut"
}
document.getElementById('test-toastr').onclick = function () {
    toastr.success('我是消息~~~~~~','我是标题')
}

</script>

<link type="text/css" href="toastr.min.css" rel="stylesheet">
<button id="test-toastr" class="btn success">点击我查看效果</button>
<script src="jquery.min.js" type="text/javascript"></script>
<script src="toastr.min.js"></script>
<script>
    toastr.options = {
        "closeButton": true,
        "debug": false,
        "newestOnTop": false,
        "progressBar": true,
        "positionClass": "toast-top-right",
        "preventDuplicates": false,
        "onclick": null,
        "showDuration": "300",
        "hideDuration": "1000",
        "timeOut": "5000",
        "extendedTimeOut": "1000",
        "showEasing": "swing",
        "hideEasing": "linear",
        "showMethod": "fadeIn",
        "hideMethod": "fadeOut"
    }
    document.getElementById('test-toastr').onclick = function () {
        toastr.success('我是消息~~~~~~','我是标题')
    }
</script>

❤动漫 | 音乐 | 游戏 萝莉赛高! 过膝袜赛高!