Los modales son ventanas emergentes que aparecen en la pantalla al pulsar un boton
Podemos crearlos de dos maneras. Mediante un ancla o un boton. El ancla con la
clase btn y ambos con la clase modal-trigger.
En el ancla ponemos el href apuntando a un identificador id, que sera donde
crearemos el modal
Creamos el div con el id idmodal y la clase modal y dentro de este, otro div con la
clase modal-content
Tambien podemos crear otro div con la clase modal-footer. Y en este los enlaces o
botones deseados. Uno importante es crear un ancla con la clase modal-close.
Para vincular el boton al modal hay que incluirle el parametro data-target con el
id del div
| Name | Type | Default | Description |
|---|---|---|---|
| opacity | Number | 0.5 | Opacity of the modal overlay. |
| inDuration | Number | 250 | Transition in duration in milliseconds. |
| outDuration | Number | 250 | Transition out duration in milliseconds. |
| onOpenStart | Function | null | Callback function called before modal is opened. |
| onOpenEnd | Function | null | Callback function called after modal is opened. |
| onCloseStart | Function | null | Callback function called before modal is closed. |
| onCloseEnd | Function | null | Callback function called after modal is closed. |
| preventScrolling | Boolean | true | Prevent page from scrolling while modal is open. |
| dismissible | Boolean | true | Allow modal to be dismissed by keyboard or overlay click. |
| startingTop | String | '4%' | Starting top offset |
| endingTop | String | '10%' | Ending top offset |