Мы используем cookies

все гайды

Сегодня хотим поделиться с вами идеей с интересной кнопкой 🙃

Задача
В данном уроке показан способ как красиво быстро и интересно преобразить вашу кнопку!
HTML
<div className="container">
  <div className="center">
    <button className="btn">
      <svg width="180px" height="60px" viewBox="0 0 180 60" className="border">
        <polyline points="179,1 179,59 1,59 1,1 179,1" className="bg-line"/>
        <polyline points="179,1 179,59 1,59 1,1 179,1" className="hl-line"/>
      </svg>
      <span>BUTTON</span>
    </button>
  </div>
</div>
CSS
body, html {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #323232;
  overflow: hidden;
  font-family: 'Lato', sans-serif;
}

.container {
  width: 400px;
  height: 400px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.center {
  width: 180px;
  height: 60px;
  position: absolute;
}

.btn {
  width: 180px;
  height: 60px;
  cursor: pointer;
  background: transparent;
  border: 1px solid #91C9FF;
  outline: none;
  transition: 1s ease-in-out;
}

svg {
  position: absolute;
  left: 0;
  top: 0;
  fill: none;
  stroke: #fff;
  stroke-dasharray: 150 480;
  stroke-dashoffset: 150;
  transition: 1s ease-in-out;
}

.btn:hover {
  transition: 1s ease-in-out;
  background: #4F95DA;
}

.btn:hover svg {
  stroke-dashoffset: -480;
}

.btn span {
  color: white;
  font-size: 18px;
  font-weight: 100;
}

Есть идеи?
Pасскажите нам о них

hello@it-justice.com
Privacy policyTerms & conditions
Behance
Вконтакте
Dribble
Linkedin
Goodfirms
©2026. ООО Джастис-ИТ. Все права защищены.