mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-27 23:30:04 +02:00
improves accordion styles
This commit is contained in:
@@ -66,7 +66,7 @@ Multiple `<button>` or `<a>` can show and hide an element if they each reference
|
|||||||
Using the [card]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/card/) component, you can extend the default collapse behavior to create an accordion.
|
Using the [card]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/card/) component, you can extend the default collapse behavior to create an accordion.
|
||||||
|
|
||||||
{% example html %}
|
{% example html %}
|
||||||
<div id="accordion">
|
<div class="accordion" id="accordion">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header" id="headingOne">
|
<div class="card-header" id="headingOne">
|
||||||
<h5 class="mb-0">
|
<h5 class="mb-0">
|
||||||
|
@@ -268,3 +268,32 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Accordion
|
||||||
|
//
|
||||||
|
|
||||||
|
.accordion {
|
||||||
|
.card:not(:first-of-type):not(:last-of-type) {
|
||||||
|
border-bottom: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card:not(:first-of-type) {
|
||||||
|
.card-header:first-child {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card:first-of-type {
|
||||||
|
border-bottom: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card:last-of-type {
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user