부트스트랩 4 JS 버튼


버튼 CSS 클래스

버튼에 대한 튜토리얼은 부트스트랩 버튼 튜토리얼 을 읽어보세요 .

아래 클래스는 <a>, <button> 또는 <input> 요소의 스타일을 지정하는 데 사용할 수 있습니다.

Class Description Example
.btn Adds basic styling to any button
.btn-block Makes a block-level button (spans the full width of the parent element)
.btn-danger Indicates a dangerous or potentially negative action
.btn-dark Dark grey button
.btn-default Indicates a default/standard button
.btn-info Contextual button for informational alert messages
.btn-lg Makes a large button
.btn-light Light grey button
.btn-link Makes a button look like a link (will still have button behavior)
.btn-outline-* Creates an outlined/bordered button. Use any of the contextual classes as * (btn-outline-primary, btn-outline-success, etc)
.btn-primary Provides extra visual weight and identifies the primary action in a set of buttons
.btn-sm Makes a small button
.btn-success Indicates a successful or positive action
.btn-secondary Indicates a "less" important action
.btn-toolbar Combine sets of button groups into button toolbars for more complex components
.btn-warning Indicates caution should be taken with this action
.active Makes the button appear pressed
.disabled Makes the button disabled

자바스크립트를 통해

다음을 사용하여 수동으로 활성화:

$('.btn').button();

버튼 옵션

None

버튼 방법

다음 표에는 사용 가능한 모든 버튼 방법이 나열되어 있습니다.

참고: 메서드는 데이터 속성을 통해 전달할 수도 있습니다. data-toggle 또는 data-dispose에서와 같이 메서드 이름을 data-에 추가합니다.

Method Description Try it
.button("toggle") Makes the button look pressed
.button("dispose") Destroys an element's button