FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Styles and classes by dbritto-dev · Pull Request #413 · javascript-tutorial/es.javascript.info · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .md  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
      • task.md
    • article.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ importance: 5

---

# Create a notification
# Crear una notificación

Write a function `showNotification(options)` that creates a notification: `<div class="notification">` with the given content. The notification should automatically disappear after 1.5 seconds.
Escribir una función `showNotification(options)` que cree una notificación: `<div class="notification">` con el contenido dado. La notificación debería desaparecer automáticamente despues de 1.5 segundos.

The options are:

```js
// shows an element with the text "Hello" near the right-top of the window
// muestra un elemento con el texto "Hello" cerca de la parte superior de la ventana
showNotification({
top: 10, // 10px from the top of the window (by default 0px)
right: 10, // 10px from the right edge of the window (by default 0px)
html: "Hello!", // the HTML of notification
className: "welcome" // an additional class for the div (optional)
top: 10, // 10px desde la parte superior de la ventana (por defecto es 0px)
right: 10, // 10px desde el borde derecho de la ventana (por defecto es 0px)
html: "Hello!", // el HTML de la notificación
className: "welcome" // una clase adicional para el "div" (opcional)
});
```

[demo src="solution"]


Use CSS positioning to show the element at given top/right coordinates. The source document has the necessary styles.
Usar posicionamiento CSS para mostrar el elemento en las coordenadas (top/right) dadas. El documento tiene los estilos necesarios.
Loading

Back | FazBrowse Home | New Git URL