仿桌面通知pnotify插件

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

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

上一篇:10327 - Flip Sort


下一篇:yii2.0 如何按需加载并管理CSS样式及JS脚本