--- id: bad87fee1348ce8acef08814 title: btn-danger を使用して危険なアクションをユーザーに警告する challengeType: 0 forumTopicId: 18375 dashedName: warn-your-users-of-a-dangerous-action-with-btn-danger --- # --description-- Bootstrap には、ボタン用にあらかじめ定義された色がいくつか用意されています。 `btn-danger` クラスのボタンの色を使用して、ボタンによって猫の写真の削除などの取り消し不可能なアクションが実行されることをユーザーに知らせます。 テキスト `Delete` を持つボタンを作成し、クラス `btn-danger` を付けてください。 これらのボタンにも `btn` クラスと `btn-block` クラスが必要であることに注意してください。 # --hints-- `Delete` というテキストを持つ新しい `button` 要素を作成します。 ```js assert(new RegExp('Delete', 'gi').test($('button').text())); ``` すべての Bootstrap ボタンに `btn` クラスと `btn-block` クラスが必要です。 ```js assert($('button.btn-block.btn').length > 2); ``` 新しいボタンにクラス `btn-danger` を持たせます。 ```js assert($('button').hasClass('btn-danger')); ``` `button` 要素にはすべて終了タグが必要です。 ```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
```