Bootstrap--CSS--buttons

Source: Internet
Author: User

The button styles mentioned in this article apply to: <a>, <button>, or <input> elements on

But it's best to use the button class on the <button> element to avoid cross-browser inconsistencies.

Button Basic Style

. BTN: Adding a basic style to a button

Button color

. Btn-default: White (background-color: #ffffff;)

. Btn-primary: Dark blue (background-color: #428bca;)

. Btn-success: Green (background-color: #5cb85c;)

. Btn-warning: Light blue (background-color: #5bc0de;)

. Btn-danger: Orange (background-color: #d9534f;)

. Btn-link: Link Style

The style type is the same (two are placed in the class, only one of the higher priority is shown), and from top to bottom, the priority is getting higher.

<!--the standard button -<Buttontype= "button"class= "Btn Btn-default">Default button</Button><!--provides additional visual effects that identify the original action in a group of buttons -<Buttontype= "button"class= "Btn btn-primary">Original button</Button><!--To indicate a successful or positive action. -<Buttontype= "button"class= "Btn btn-success">Success Button</Button><!--Context button for informational warning message -<Buttontype= "button"class= "Btn btn-info">Info button</Button><!--an action that should be taken with caution -<Buttontype= "button"class= "Btn btn-warning">Warning button</Button><!--represents a dangerous or potentially negative action . -<Buttontype= "button"class= "Btn Btn-danger">Danger button</Button><!--does not emphasize is a button that looks like a link, but while keeping the behavior of the button -<Buttontype= "button"class= "Btn Btn-link">Link button</Button>

Button size

. BTN-XS: Super Small button

. BTN-SM: Small button

. BTN-LG: Large button

. Btn-block: Block-level button (stretched to parent element 100% width)

<P>   <Buttontype= "button"class= "btn btn-primary btn-lg">Big original Button</Button>   <Buttontype= "button"class= "btn btn-default btn-lg">big button.</Button></P><P>   <Buttontype= "button"class= "Btn btn-primary">Original button of default size</Button>   <Buttontype= "button"class= "Btn Btn-default">Default-sized buttons</Button></P><P>   <Buttontype= "button"class= "btn btn-primary btn-sm">Small Original button</Button>   <Buttontype= "button"class= "btn btn-default btn-sm">the small button</Button></P><P>   <Buttontype= "button"class= "btn btn-primary btn-xs">very Small original button</Button>   <Buttontype= "button"class= "btn btn-default btn-xs">very small button.</Button></P><P>   <Buttontype= "button"class= "btn btn-primary btn-lg btn-block">block-level raw button</Button>   <Buttontype= "button"class= "btn btn-default btn-lg btn-block">block-level buttons</Button></P>

Button state

. Active: Activation status (Button clicked)

. Disabled: Disabled status (Button cannot be clicked)

<P>   <Buttontype= "button"class= "btn btn-default btn-lg">Default button</Button>   <Buttontype= "button"class= "BTN btn-default btn-lg Active">Activate button</Button></P><P>   <Buttontype= "button"class= "btn btn-primary btn-lg">Original Button</Button>   <Buttontype= "button"class= "BTN btn-primary btn-lg Active">Activated original button</Button></P>

<P>   <Buttontype= "button"class= "btn btn-default btn-lg">Default button</Button>   <Buttontype= "button"class= "btn btn-default btn-lg Disabled">Disable button</Button></P><P>   <Buttontype= "button"class= "btn btn-primary btn-lg">Original Button</Button>   <Buttontype= "button"class= "btn btn-primary btn-lg"Disabled= "Disabled">The original button is disabled</Button></P><P>   <ahref="#"class= "btn btn-default btn-lg"role= "button">links</a>   <ahref="#"class= "btn btn-default btn-lg Disabled"role= "button">Disable Links</a></P><P>   <ahref="#"class= "btn btn-primary btn-lg"role= "button">original link</a>   <ahref="#"class= "btn btn-primary btn-lg Disabled"role= "button">the original link is disabled</a></P>

Bootstrap--CSS--buttons

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.