` element. Also add `flex-wrap: wrap;`, to let the buttons wrap on a new line on small screens:
```css
.btn-group {
display: flex;
flex-wrap: wrap;
}
.button {
background-color: #04AA6D;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
font-size: 16px;
cursor: pointer;
}
.btn-group .button:hover {
background-color: dodgerblue;
}
```
**CSS Bordered Button Group** [S1]
Use the `border` property to create a bordered button group:
```css
.button {
border: 1px solid green;
}
.btn-group .button:not(:last-child) {
border-right: none;
}
```
**CSS Vertical Button Group** [S1]
To create a vertical button group, wrap the buttons in a `
` element, and add `display: flex;` to the `
` element. Also add `flex-direction: column;`, to let the buttons be displayed in a vertical way:
```css
.btn-group {
display: flex;
flex-direction: column;
}
```
**CSS Animated Buttons** [S1]
The source page presents an "CSS Animated Buttons" section with four labelled examples β "Add an arrow on hover", "Add a 'pressed' effect on click", "Fade in on hover", and "Add a 'ripple' effect on click". The CSS source for these four examples is only offered behind "Try it Yourself" interactive links and is not present as text on the page.
> Code for the four animated-button examples: Not found in source.
## π οΈ μ μ© μ¬λ‘ (Applied in summary)
The page's own examples are the applied cases: a horizontal `.btn-group` of `.button` elements, a bordered variant collapsing the shared border, and a vertical variant. No external project/commit applications found in the source.
## π» μ½λ ν¨ν΄ (Code patterns)
Horizontal group container (language: CSS):
```css
.btn-group {
display: flex;
flex-wrap: wrap;
}
```
Vertical group container (language: CSS):
```css
.btn-group {
display: flex;
flex-direction: column;
}
```
Collapse the inner border (language: CSS):
```css
.btn-group .button:not(:last-child) {
border-right: none;
}
```
## βοΈ λͺ¨μ λ° μ
λ°μ΄νΈ (Contradictions & updates)
No contradictions found in the source.
## β
κ²μ¦ μν λ° μ λ’°λ
- **μν:** draft
- **κ²μ¦ λ¨κ³:** conceptual (μ€μ μ μ© μ¬λ‘ λ°κ²¬ μ applied/validatedλ‘ μΉκ²© κ°λ₯)
- **μΆμ² μ λ’°λ:** B (W3Schools β widely used educational reference, not a primary standards body)
- **μ λ’° μ μ:** 0.88
- **μ€λ³΅ κ²μ¬ κ²°κ³Ό:** μ κ· μμ± (New discovery)
## π μ§μ κ·Έλν (Knowledge Graph)
- **μμ/루νΈ:** [[CSS Tutorial]]
- **κ΄λ ¨ κ°λ
:** [[CSS Buttons]], [[CSS Flexbox]], [[CSS Borders]], [[CSS Pagination]]
- **μ°Έμ‘° λ§₯λ½:** Referenced when grouping related actions (toolbars, segmented controls) into a single visual unit.
## π μΆμ² (Sources)
- [S1] W3Schools β CSS Button Groups β https://www.w3schools.com/css/css3_buttons_groups.asp
## π λ³κ²½ μ΄λ ₯ (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "CSS Button Groups" page (Astra wiki-curation, P-Reinforce v3.1 format).