You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 2-ui/1-document/08-styles-and-classes/2-create-notification/task.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,23 +2,23 @@ importance: 5
2
2
3
3
---
4
4
5
-
# Create a notification
5
+
# Crear una notificación
6
6
7
-
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.
7
+
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.
8
8
9
9
The options are:
10
10
11
11
```js
12
-
//shows an element with the text "Hello" near the right-top of the window
12
+
//muestra un elemento con el texto "Hello" cerca de la parte superior de la ventana
13
13
showNotification({
14
-
top:10, // 10px from the top of the window (by default 0px)
15
-
right:10, // 10px from the right edge of the window (by default 0px)
16
-
html:"Hello!", //the HTML of notification
17
-
className:"welcome"//an additional class for the div (optional)
14
+
top:10, // 10px desde la parte superior de la ventana (por defecto es 0px)
15
+
right:10, // 10px desde el borde derecho de la ventana (por defecto es 0px)
16
+
html:"Hello!", //el HTML de la notificación
17
+
className:"welcome"//una clase adicional para el "div" (opcional)
18
18
});
19
19
```
20
20
21
21
[demo src="solution"]
22
22
23
23
24
-
Use CSS positioning to show the element at given top/right coordinates. The source document has the necessary styles.
24
+
Usar posicionamiento CSS para mostrar el elemento en las coordenadas (top/right) dadas. El documento tiene los estilos necesarios.
0 commit comments