Mínimo plugin de JavaScript para Android como notificaciones tostadas
| Autor: | yuanxj1024 |
|---|---|
| Views Total: | 2,362 |
| Sitio oficial: | Ir a la web |
| Actualizado: | August 29, 2015 |
| Licencia: | MIT |
Vista prévia
Descripción
Toast. js es una biblioteca de JavaScript ligera y fácil de usar que se utiliza para mostrar Android como notificaciones del sistema en sus aplicaciones web móviles o de escritorio.
¿Cómo funciona?
Importe el script Toast. js en el documento.
<script src="src/toast.js"></script>
Muestra notificaciones del sistema con mensajes personalizados en la aplicación Web. El complemento proporciona 9 métodos para crear diferentes tipos de notificaciones del sistema.
window.plugins.toast.showExShortTop(message) window.plugins.toast.showExShortCenter(message) window.plugins.toast.showExShortBottom(message) window.plugins.toast.showShortTop(message) window.plugins.toast.showShortCenter(message) window.plugins.toast.showShortBottom(message) window.plugins.toast.showLongTop(message) window.plugins.toast.showLongCenter(message) window.plugins.toast.showLongBottom(message)
Estilo de las notificaciones del sistema.
.toastWrap {
display: -webkit-box;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flexbox;
display: flex;
z-index: 200;
position: absolute;
width: 100%;
color: #ffffff;
height: 30px;
display: none;
text-align: center;
}
.toastWrap span {
-webkit-box-flex: 0;
-webkit-flex: 0 0 auto;
-moz-box-flex: 0;
-moz-flex: 0 0 auto;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
border-radius: 5px;
opacity: 0.8;
filter: alpha(opacity=80);
background-color: #000000;
display: inline;
margin: 0 auto;
font-size: 14px;
padding: 10px;
}
.toastWrap.bottom {
position: fixed !important;
bottom: 0 !important;
}





