--- id: bad87fee1348bd9bedf08813 title: Aggiungere bordi Intorno agli elementi challengeType: 0 videoUrl: 'https://scrimba.com/c/c2MvnHZ' forumTopicId: 16630 dashedName: add-borders-around-your-elements --- # --description-- I bordi CSS hanno proprietà come `style`, `color` e `width`. Per esempio, se volessimo creare un bordo rosso di 5 pixel attorno ad un elemento HTML, potremmo usare questa classe: ```html ``` # --instructions-- Crea una classe chiamata `thick-green-border`. Questa classe dovrebbe aggiungere un bordo di 10px, solido e verde intorno ad un elemento HTML. Applica la classe alla foto del gatto. Ricorda che puoi applicare più classi a un elemento usando il suo attributo `class`, separando ogni nome di classe con uno spazio. Per esempio: ```html ``` # --hints-- Il tuo elemento `img` dovrebbe avere la classe `smaller-image`. ```js assert($('img').hasClass('smaller-image')); ``` Il tuo elemento `img` dovrebbe avere la classe `thick-green-border`. ```js assert($('img').hasClass('thick-green-border')); ``` La tua immagine dovrebbe avere uno spessore del bordo di `10px`. ```js assert( $('img').hasClass('thick-green-border') && parseInt($('img').css('border-top-width'), 10) >= 8 && parseInt($('img').css('border-top-width'), 10) <= 12 ); ``` La tua immagine dovrebbe avere uno stile `solid` per il bordo. ```js assert($('img').css('border-right-style') === 'solid'); ``` Il bordo attorno al tuo elemento `img` dovrebbe essere verde. ```js assert($('img').css('border-left-color') === 'rgb(0, 128, 0)'); ``` # --seed-- ## --seed-contents-- ```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats


``` # --solutions-- ```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats


```