Como fazer - Grupo de botões verticais
Aprenda a criar um "grupo de botões" vertical com CSS.
Grupos de botões verticais
Agrupe uma série de botões em um grupo de botões vertical:
Como criar um grupo de botões vertical
Etapa 1) Adicionar HTML:
Exemplo
<div class="btn-group">
<button>Apple</button>
<button>Samsung</button>
<button>Sony</button>
</div>
Etapa 2) Adicionar CSS:
Exemplo
.btn-group button {
background-color: #04AA6D; /* Green
background */
border: 1px solid green; /* Green border
*/
color: white; /* White text */
padding: 10px 24px; /* Some padding */
cursor: pointer;
/* Pointer/hand icon */
width: 50%; /* Set a width if
needed */
display: block; /* Make the buttons appear
below each other */
}
.btn-group
button:not(:last-child) {
border-bottom: none; /*
Prevent double borders */
}
/* Add a background color on hover */
.btn-group button:hover {
background-color: #3e8e41;
}
Dica: Acesse nosso Tutorial de Botões CSS para saber mais sobre como estilizar botões.