How to create: pill-shaped button

Learn how to create a pill-shaped button using CSS.

How to create a pill-shaped button

First step - Add HTML:

<button class="button">Pill Button</button>

Second step - Add CSS:

Use the border-radius property to add rounded corners to the button:

.button {
  background-color: #ddd;
  border: none;
  color: black;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 16px;
}

Experimente por sua conta

Páginas relacionadas

Tutorial:Botão CSS