0
点赞
收藏
分享

微信扫一扫

仿桌面通知pnotify插件

雨鸣静声 2022-04-06 阅读 28


在做网站的时候,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>


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



举报

相关推荐

0 条评论