--- id: bad87fee1348bd9aedf08815 title: 用 border-radius 製作圓形圖片 challengeType: 0 videoUrl: 'https://scrimba.com/c/c2MvrcB' forumTopicId: 18229 dashedName: make-circular-images-with-a-border-radius --- # --description-- 除像素外,你也可以使用百分比來指定 `border-radius` 的值。 # --instructions-- 將 `border-radius` 的屬性值設置爲 `50%`。 # --hints-- 圖片的邊框圓角應設置爲 `50%`,這樣圖片就會是圓形的。 ```js assert(parseInt($('img').css('border-top-left-radius')) > 48); ``` `border-radius` 的值應爲 `50%`。 ```js assert(code.match(/50%/g)); ``` # --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


```