所属分类:工具提示,对话框

js消息提示框插件notice.js

26866 浏览 225 收藏 4 留言
ie兼容12

插件描述

js消息提示框插件notice.js,多种提示动画效果,带进度显示。

更新时间
2019-08-23 09:19
下载量
630
所需 JQ 币
0
分类
UI / 工具提示,对话框

详细内容

js消息提示框插件notice.js

notice.js是一款纯js超酷消息提示框插件。notice.js为纯js编写,没有任何依赖文件。通过它可以在页面上制作出漂亮的toast消息通知框效果。该js消息提示框插件的特点

  • 支持4中情景类型:error, warning, info, success。

  • 消息框可以显示在9个位置:topLeft, topCenter, middleLeft, middleRight, middleCenter, bottomLeft, bottomRight, bottomCenter。

  • 消息框内容支持HTML元素。

可以通过npm或bower来安装notice.js插件。

bower install notice.js --save
npm install notice.js --save

在页面中引入noticejs.css和noticejs.js文件。

<link href="dist/noticejs.css" rel="stylesheet" type="text/css">
<script src="dist/noticejs.js"></script>

初始化插件

notice.js消息提示框插件最基本的用法如下:

new NoticeJs({
   text: 'Notification message',
   position: 'topLeft',
}).show();

你也可以结合animate.css来为消息通知框添加炫酷的CSS3动画效果。

在页面中引入animate.css文件。

<link href="css/animate.css" rel="stylesheet" type="text/css">

然后在配置参数中设置animation参数:

new NoticeJs({
   text: 'Notification message',
   position: 'topLeft',
   animation: {
       open: 'animated bounceInRight',
       close: 'animated bounceOutLeft'
   }
}).show();

关键词:js消息提示框插件notice.js,对话框,弹出层,jquery,jquery插件

讨论这个项目 (4)

Chuck
不错,好东西,谢谢分享!
a'╃下一页的记忆
我想知道这个只有success样式啊怎么修改其他样式
哈喽,早上好
做的真好
不停
这东西好哇,ありがとうございます楼主分享

当前页面为只读展示,仅显示已审核留言;提交留言功能暂未开放。