<div class="btn">
  Content 1
</div>

<div class="btn">
  Content 2
</div>
body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  min-height: 100vh;
  background-color: rgb(217, 216, 221);
  background-image: url('data:image/svg+xml,%3Csvg width="52" height="26" viewBox="0 0 52 26" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%239C92AC" fill-opacity="0.4"%3E%3Cpath d="M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z" /%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
  font-family: tahoma;
}

/* btns */

.btn {
  box-sizing: border-box;
  color: #fff;
  font-size: 16px;
  line-height: 16px;
  font-weight: normal;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: 0.3s all;
  position: relative;
  padding: 10px 20px;
  min-height: 50px;
  min-width: 140px;
  background-color: transparent;
  background-image: none;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bold;
  position: relative;
  z-index: 0;
}

.btn:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: -1;
  background-color: #000;
  border-radius: 30px;
  transition: 0.3s all;
}

.btn:hover:after {
  left: -20px;
  right: -20px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.