btn-danger
类是用于通知用户按钮执行破坏性操作的按钮颜色,例如删除猫照片。创建一个带有“删除”文本的按钮,并为其提供类btn-danger
。请注意,这些按钮仍然需要btn
和btn-block
类。 button
元素。
testString: 'assert(new RegExp("Delete","gi").test($("button").text()), "Create a new button
element with the text "Delete".");'
- text: 你的所有Bootstrap按钮都应该有btn
和btn-block
类。
testString: 'assert($("button.btn-block.btn").length > 2, "All of your Bootstrap buttons should have the btn
and btn-block
classes.");'
- text: 你的新按钮应该有类btn-danger
。
testString: 'assert($("button").hasClass("btn-danger"), "Your new button should have the class btn-danger
.");'
- text: 确保所有button
元素都有一个结束标记。
testString: 'assert(code.match(/<\/button>/g) && code.match(/Click here for cat photos.
Things cats love:
Top 3 things cats hate: