--- id: bad87fee1347bd9aedf08845 title: Sostituire il CSS personalizzato con quello di Bootstrap challengeType: 0 forumTopicId: 17565 dashedName: ditch-custom-css-for-bootstrap --- # --description-- Possiamo ripulire il nostro codice e rendere la nostra Cat Photo App guardare più convenzionale utilizzando gli stili incorporati di Bootstrap invece degli stili personalizzati che abbiamo creato in precedenza. Non preoccuparti - ci sarà un sacco di tempo per personalizzare il nostro CSS successivamente. Elimina le dichiarazioni CSS `.red-text`, `p`, e `.smaller-image` dal tuo elemento `style` in modo che le uniche dichiarazioni rimanenti in `style` siano `h2` e `thick-green-border`. Quindi elimina l'elemento `p` che contiene un link a vuoto. Quindi rimuovi la classe `red-text` dal tuo elemento `h2` e sostituiscila con la classe `text-primary` di Bootstrap. Infine, rimuovi la classe `smaller-image` dal tuo primo elemento `img` e sostituiscila con la classe `img-responsive`. # --hints-- Il tuo elemento `h2` non dovrebbe più avere la classe `red-text`. ```js assert(!$('h2').hasClass('red-text')); ``` Il tuo elemento `h2` dovrebbe ora avere la classe `text-primary`. ```js assert($('h2').hasClass('text-primary')); ``` I tuoi elementi di paragrafo non dovrebbero più usare il carattere `Monospace`. ```js assert( !$('p') .css('font-family') .match(/monospace/i) ); ``` La classe `smaller-image` dovrebbe essere rimossa dalla tua immagine in alto. ```js assert(!$('img').hasClass('smaller-image')); ``` Dovresti aggiungere la classe `img-responsive` alla tua immagine più in alto. ```js assert($('.img-responsive').length > 1); ``` # --seed-- ## --seed-contents-- ```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
``` # --solutions-- ```html

CatPhotoApp

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
```