--- id: bad87fee1348ce8acef08814 title: Avvisare gli utenti di un'azione pericolosa con btn-danger challengeType: 0 forumTopicId: 18375 dashedName: warn-your-users-of-a-dangerous-action-with-btn-danger --- # --description-- Bootstrap è dotato di diversi colori predefiniti per i pulsanti. La classe `btn-danger` è il colore che userai per notificare agli utenti che il bottone esegue un'azione distruttiva, come la cancellazione della foto di un gatto. Crea un bottone con il testo `Delete` e dagli una classe `btn-danger`. Nota che questi pulsanti hanno ancora bisogno delle classi `btn` e `btn-block`. # --hints-- Dovresti creare un nuovo elemento `button` con il testo `Delete`. ```js assert(new RegExp('Delete', 'gi').test($('button').text())); ``` Tutti i bottoni di Bootstrap dovrebbero avere le classi `btn` e `btn-block`. ```js assert($('button.btn-block.btn').length > 2); ``` Il tuo nuovo bottone dovrebbe avere la classe `btn-danger`. ```js assert($('button').hasClass('btn-danger')); ``` Tutti i tuoi elementi `button` dovrebbero avere dei tag di chiusura. ```js assert( code.match(/<\/button>/g) && code.match(/

Things cats love:

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
``` # --solutions-- ```html

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back. Three kittens running towards the camera.

Things cats love:

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```