|
.btn | {display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; user-select: none; background-image: none; border: 1px solid transparent; border-radius: 4px; } |
Focus | |
---|---|
.btn:focus, .btn:active:focus, .btn.active:focus | outline: thin dotted; outline: 5px auto focus-ring-color; outline-offset: -2px; } |
.btn:active, .btn.active | { background-image: none; outline: 0; box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } |
Inaktiv | |
.btn.disabled, .btn[disabled], fieldset[disabled] .btn | {pointer-events: none; cursor: not-allowed; filter: alpha(opacity=65); box-shadow: none; opacity: .65; } |
Pr. farve default, primary, success, info, warning, danger | |
.btn-default | {
color: #333; background-color: # fff; border-color: #ccc; } |
.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default | {color: #333; background-color: # e6e6e6; border-color: #adadad; } |
.btn-default:active, .open > .dropdown-toggle .btn-default | { background-image: none; } |
.btn-default:active, .btn-default.active, .open > .dropdown-toggle .btn-default | t { background-image: none; } |
.btn-default.disabled, .btn-default[disabled], fieldset[disabled] .btn-default, .btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover, .btn-default.disabled:focus, .btn-default[disabled]:focus, fieldset[disabled] .btn-default:focus, .btn-default.disabled:active, .btn-default[disabled]:active, fieldset[disabled] .btn-default:active, .btn-default.disabled.active, .btn-default[disabled].active, fieldset[disabled] .btn-default.active | { background-color: # fff; border-color: #ccc; } |
.btn-default .badge | { color: #fff; background-color: # 333; } |
Link | |
.btn-link | {
font-weight: normal; color: #428bca; cursor: pointer; border-radius: 0; } |
.btn-link, .btn-link:active, .btn-link[disabled], fieldset[disabled] .btn-link | { background-color: transparent; -webkit-box-shadow: none; box-shadow: none; } |
.btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active | { border-color: transparent; } |
.btn-link:hover, .btn-link:focus | { color: #2a6496; text-decoration: underline; background-color: transparent; } |
.btn-link[disabled]:hover, fieldset[disabled] .btn-link:hover, .btn-link[disabled]:focus, fieldset[disabled] .btn-link:focus | { color: #777; text-decoration: none; } |
Pr. @media gruppe lg, sm og xs | |
.btn-lg, .btn-group-lg > .btn | n { padding: 10px 16px; font-size: 18px; line-height: 1.33; border-radius: 6px; } |
.btn-sm, .btn-group-sm > .btn | {
padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } |
.btn-xs, .btn-group-xs > .btn | {padding: 1px 5px; font-size: 12px; line-height: 1.5; border-radius: 3px; } |
Block | |
.btn-block | { display: block; width: 100%; } |
.btn-block + .btn-block | { margin-top: 5px; } |
input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block |
{ width: 100%; } |
Gruppe | |
.btn-group, .btn-group-vertical | { position: relative; display: inline-block; vertical-align: middle; } |
.btn-group > .btn, .btn-group-vertical > .btn | { position: relative; float: left; } |
.btn-group > .btn:hover, .btn-group-vertical > .btn:hover, .btn-group > .btn:focus, .btn-group-vertical > .btn:focus, .btn-group > .btn:active, .btn-group-vertical > .btn:active, .btn-group > .btn.active, .btn-group-vertical > .btn.active | { z-index: 2; } |
.btn-group > .btn:focus, .btn-group-vertical > .btn:focus | { outline: 0; } |
.btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group | { margin-left: -1px; } |
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) | { border-radius: 0; } |
.btn-group > .btn:first-child | { margin-left: 0; } |
btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) | {
border-top-right-radius: 0; border-bottom-right-radius: 0; } |
.btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) | {
border-top-left-radius: 0; border-bottom-left-radius: 0; } |
.btn-group > .btn-group | { float: left; } |
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn | { border-radius: 0; } |
.btn-group > .btn-group:first-child > .btn:last-child, .btn-group > .btn-group:first-child > .dropdown-toggle | {
border-top-right-radius: 0; border-bottom-right-radius: 0; } |
.btn-group > .btn-group:last-child > .btn:first-child | {
border-top-left-radius: 0; border-bottom-left-radius: 0; } |
.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle | e { outline: 0; } |
.btn-group > .btn + .dropdown-toggle | {
padding-right: 8px; padding-left: 8px; } |
.btn-group > .btn-lg + .dropdown-toggle | e {
padding-right: 12px; padding-left: 12px; } |
.btn-group.open .dropdown-toggle | {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } |
.btn-group.open .dropdown-toggle.btn-link | { -webkit-box-shadow: none; box-shadow: none; } |
.btn-group-vertical > .btn, .btn-group-vertical > .btn-group, .btn-group-vertical > .btn-group > .btn | {
display: block; float: none; width: 100%; max-width: 100%; } |
.btn-group-vertical > .btn-group > .btn | { float: none; } |
.btn-group-vertical > .btn + .btn, .btn-group-vertical > .btn + .btn-group, .btn-group-vertical > .btn-group + .btn, .btn-group-vertical > .btn-group + .btn-group | {
margin-top: -1px; margin-left: 0; } |
.btn-group-vertical > .btn:not(:first-child):not(:last-child) | { border-radius: 0; } |
.btn-group-vertical > .btn:first-child:not(:last-child) | ) {
border-top-right-radius: 4px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } |
.btn-group-vertical > .btn:last-child:not(:first-child) | {
border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-left-radius: 4px; } |
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn | { border-radius: 0; } |
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle | {
border-bottom-right-radius: 0; border-bottom-left-radius: 0; } |
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child | {
border-top-left-radius: 0; border-top-right-radius: 0; } |