Notyf响应式通知插件
Notyf 是一个超级简单的,响应式,原生 javascript 插件,用来显示通知。
演示
安装
安装 npm 包:
npm install --save notyf
添加至项目:
<html>
<head>
...
<link rel="stylesheet" type="text/css" href="/path/to/notyf.min.css">
</head>
<body>
... <script src="/path/to/notyf.min.js" type="text/javascript"></script>
</body>
</html>
使用
//Create an instance of Notyf
var notyf = new Notyf();
//Display an alert notification
notyf.alert('You must fill out the form before moving forward');
//Display a success notification
notyf.confirm('Your changes have been successfully saved!');
评论
