Crear notificaciones push web con JavaScript-notado EZ. js
| Autor: | ZeroX-DG |
|---|---|
| Views Total: | 1,013 |
| Sitio oficial: | Ir a la web |
| Actualizado: | October 19, 2018 |
| Licencia: | MIT |
Vista prévia
Descripción
Establezca el ancho de la información sobre herramientas.
Funcionamiento
Establezca el ancho de la información sobre herramientas.
# NPM $ npm install noticez --save
// for nodejs
let NoticeZ = require('noticez');
NoticeZ('hello', 'this is a notification'); Establezca el ancho de la información sobre herramientas.
<script src="NoticeZ.js"></script>
Establezca el ancho de la información sobre herramientas.
NoticeZ ( 'Default Message' , 'A default message here' )
Establezca el ancho de la información sobre herramientas.
NoticeZ ( 'Default Message' , 'A default message here',{
// top left
// top right
// bottom left
// bottom right
position: "bottom right",
// auto close after 3 seoncs
time: 3000,
// in pixels
padding: 10,
// is closeable?
closeAble: false,
// shows an image inside the notification
image: ''
} ) Establezca el ancho de la información sobre herramientas.
let styles = {
notification: {
background: "#3498db",
width: "350px",
height: "150px",
boxSizing: "border-box",
background: "#3498db",
padding: "20px",
color: "white",
borderRadius: "8px",
boxShadow: "0px 10px 20px -2px rgba(0, 0, 0, 0.24)",
transition: "all 0.4s",
position: "fixed",
fontFamily: "Tahoma"
},
title: {
fontSize: "1.5rem",
marginBottom: "20px",
fontFamily: "Tahoma",
marginTop: "0px"
},
content: {
fontSize: "1.1rem",
lineHeight: "1.5rem",
fontFamily: "Tahoma"
}
}; Event handlers.
let events = {
OnMouseOver: () => {
alert ( 'mouse on' );
},
OnMouseLeave: () => {
alert ( 'mouse off' );
},
OnDisappear: () => {
alert ( 'good bye' );
}
OnClick: () => {
alert ( 'click' );
}
}
NoticeZ ( 'Default Message' , 'A default message here' , {} , events ) Registro de cambios
v1.2.0 (10/19/2018)
- conflicto de mezcla fijo de desarrollar





