-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Кнопка на HTML & CSS с анимацией.
Идея и градиет взяты (спизжены) из этого
Итак, HTML:
CSS:
Идея и градиет взяты (спизжены) из этого
Пожалуйста, авторизуйтесь для просмотра ссылки.
Пожалуйста, авторизуйтесь для просмотра ссылки.
Итак, HTML:
HTML:
<a href="#" class="button"><span>gaysense</span></a>
CSS:
/* вырезать при пасте к себе - начало */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500&display=swap');
*{
margin: 0;
padding: 0;
user-select: none;
cursor: pointer;
}
body{
font-family: 'Montserrat', sans-serif;
background-color: #222;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
/* вырезать при пасте к себе - конец */
.button{
width: 10vw;
height: 5vh;
-webkit-box-reflect: below 1px linear-gradient(transparent, #0004);
position: relative;
line-height: 5vh;
}
.button:before{
content: '';
position: absolute;
top: 0;
left: 0;
background: linear-gradient(to right, #1e5799 0%,#f300ff 40%,#e0ff00 80%, #1e5799 100%);
width: 100%;
height: 100%;
background-size: 400%;
animation: gradient 30s linear infinite;
}
.button span{
font-size: 18px;
text-transform: uppercase;
letter-spacing: 2px;
position: absolute;
display: block;
top: 2px;
bottom: 2px;
left: 2px;
right: 2px;
text-align: center;
color: rgba(255, 255, 255, 0.5);
transition: 0.2s all ease-in-out;
background-color: #333;
z-index: 999;
}
.button span:hover{
color: rgb(255, 255, 255, 0.7);
}
@keyframes gradient{
0%{
background-position: 0 0;
}
50%{
background-position: 200% 0;
}
100%{
background-position: 0 0;
}
}
Последнее редактирование: