在做网站的时候,alert弹出框是非常常见的情形。但是,有些情况下,弹框对用户来说是并不友好的。调研了几个其他的提示插件了,发现pnotify比较好用,可配置性也高。

使用示例:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="./pnotify.custom.min.css">
</head>
<body>

    <script src="./jquery-1.12.0.min.js"></script>
    <script src="./pnotify.custom.min.js"></script>

    <script type="text/javascript">
    $(function(){
        new PNotify({
            title: 'Regular Notice',
            text: 'Check me out! I\'m a notice.'
        });

        new PNotify('Check me out!');

        new PNotify({
            title: 'Regular Success',
            text: 'That thing that you were trying to do worked!',
            type: 'success'
        });
    });
</script>
</body>
</html>

更多效果,可以点击 这里 。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-02-24
猜你喜欢
  • 2021-12-04
  • 2021-06-04
  • 2022-12-23
  • 2021-12-04
  • 2021-12-04
  • 2021-12-04
相关资源
相似解决方案