Skip to content

Commit f97e143

Browse files
authored
Merge pull request #272 from marcellosurdi/article/styles-and-classes-
Styles and classes
2 parents 4b2d82d + 88bba91 commit f97e143

File tree

4 files changed

+110
-109
lines changed

4 files changed

+110
-109
lines changed

2-ui/1-document/08-styles-and-classes/2-create-notification/solution.view/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h2>Notification is on the right</h2>
3232
setTimeout(() => notification.remove(), 1500);
3333
}
3434

35-
// test it
35+
// prova
3636
let i = 1;
3737
setInterval(() => {
3838
showNotification({

2-ui/1-document/08-styles-and-classes/2-create-notification/source.view/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ <h2>Notification is on the right</h2>
1616

1717
<script>
1818
function showNotification({top = 0, right = 0, className, html}) {
19-
/* your code */
19+
/* il tuo codice */
2020
}
2121

22-
// test it
22+
// prova
2323
let i = 1;
2424
setInterval(() => {
2525
showNotification({

2-ui/1-document/08-styles-and-classes/2-create-notification/task.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ importance: 5
22

33
---
44

5-
# Create a notification
5+
# Create un messaggio di notifica
66

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+
Scrivete una funzione `showNotification(options)` che crei una notifica: `<div class="notification">` con un dato contenuto. La notifica dovrebbe automaticamente sparire dopo 1.5 secondi.
88

9-
The options are:
9+
Le opzioni sono:
1010

1111
```js
12-
// shows an element with the text "Hello" near the right-top of the window
12+
// mostra un elemento con il testo "Hello" in prossimità dell'angolo in alto a destra della finestra
1313
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 dalla parte superiore della finestra (valore predefinito 0px)
15+
right: 10, // 10px dal bordo destro della finestra (valore predefinito 0px)
16+
html: "Hello!", // l'HTML della notifica
17+
className: "welcome" // una classe addizionale per il div (opzionale)
1818
});
1919
```
2020

2121
[demo src="solution"]
2222

2323

24-
Use CSS positioning to show the element at given top/right coordinates. The source document has the necessary styles.
24+
Usate il posizionamento CSS per mostrare l'elemento alle coordinate top/right ricevute. Il documento sorgente ha gli stili necessari.

0 commit comments

Comments
 (0)