😎 » DARYA DLE » Готовые дизайны » Кнопки переливание градиентом
1 263 0  

Кнопки переливание градиентом

Разноцветные кнопки с переливанием градиента при ховере. кнопки сделаны на чистом css

html код кнопок:

<div class="buttons">
    <button class="btn-hover color-1">BUTTON1</button>
    <button class="btn-hover color-2">BUTTON2</button>
    <button class="btn-hover color-3">BUTTON3</button>
    <button class="btn-hover color-4">BUTTON4</button>
    <button class="btn-hover color-5">BUTTON5</button>
    <button class="btn-hover color-6">BUTTON6</button>
    <button class="btn-hover color-7">BUTTON7</button>
    <button class="btn-hover color-8">BUTTON8</button>
    <button class="btn-hover color-9">BUTTON9</button>
    <button class="btn-hover color-10">BUTTON10</button>
    <button class="btn-hover color-11">BUTTON11</button>
</div>

CSS код градиентных кнопок:

* {-webkit-box-sizing: border-box;    -moz-box-sizing: border-box;    box-sizing: border-box;}
.buttons {margin: 10%;    text-align: center;}
.btn-hover {width: 200px;    font-size: 16px;    font-weight: 600;    color: #fff;    cursor: pointer;    margin: 20px;    height: 55px;    text-align:center;    border: none;    background-size: 300% 100%; border-radius: 50px;    moz-transition: all .4s ease-in-out;    -o-transition: all .4s ease-in-out;    -webkit-transition: all .4s ease-in-out;    transition: all .4s ease-in-out;}
.btn-hover:hover {background-position: 100% 0;    moz-transition: all .4s ease-in-out;    -o-transition: all .4s ease-in-out;    -webkit-transition: all .4s ease-in-out;    transition: all .4s ease-in-out;}
.btn-hover:focus {outline: none;}
.btn-hover.color-1 {background-image: linear-gradient(to right, #25aae1, #40e495, #30dd8a, #2bb673);    box-shadow: 0 4px 15px 0 rgba(49, 196, 190, 0.75);}
.btn-hover.color-2 {background-image: linear-gradient(to right, #f5ce62, #e43603, #fa7199, #e85a19);    box-shadow: 0 4px 15px 0 rgba(229, 66, 10, 0.75);}
.btn-hover.color-3 {background-image: linear-gradient(to right, #667eea, #764ba2, #6B8DD6, #8E37D7);    box-shadow: 0 4px 15px 0 rgba(116, 79, 168, 0.75);}
.btn-hover.color-4 {background-image: linear-gradient(to right, #fc6076, #ff9a44, #ef9d43, #e75516);    box-shadow: 0 4px 15px 0 rgba(252, 104, 110, 0.75);}
.btn-hover.color-5 {background-image: linear-gradient(to right, #0ba360, #3cba92, #30dd8a, #2bb673);    box-shadow: 0 4px 15px 0 rgba(23, 168, 108, 0.75);}
.btn-hover.color-6 {background-image: linear-gradient(to right, #009245, #FCEE21, #00A8C5, #D9E021);    box-shadow: 0 4px 15px 0 rgba(83, 176, 57, 0.75);}
.btn-hover.color-7 {background-image: linear-gradient(to right, #6253e1, #852D91, #A3A1FF, #F24645);    box-shadow: 0 4px 15px 0 rgba(126, 52, 161, 0.75);}
.btn-hover.color-8 {background-image: linear-gradient(to right, #29323c, #485563, #2b5876, #4e4376);    box-shadow: 0 4px 15px 0 rgba(45, 54, 65, 0.75);}
.btn-hover.color-9 {background-image: linear-gradient(to right, #25aae1, #4481eb, #04befe, #3f86ed);    box-shadow: 0 4px 15px 0 rgba(65, 132, 234, 0.75);}
.btn-hover.color-10 {background-image: linear-gradient(to right, #ed6ea0, #ec8c69, #f7186a , #FBB03B);    box-shadow: 0 4px 15px 0 rgba(236, 116, 149, 0.75);}
.btn-hover.color-11 {background-image: linear-gradient(to right, #eb3941, #f15e64, #e14e53, #e2373f);  box-shadow: 0 5px 15px rgba(242, 97, 103, .4);}


Кнопки от Квасова (пример в самом низу):

<div class="kvasov-box-gradient">
  <a class="kvasov-btn-gradient btn-color-1">Наведи на меня</a>
  <a class="kvasov-btn-gradient btn-color-2">Наведи на меня</a>
  <a class="kvasov-btn-gradient btn-color-3">Наведи на меня</a> 
  <a class="kvasov-btn-gradient btn-color-4">Наведи на меня</a> 
  <a class="kvasov-btn-gradient btn-color-5">Наведи на меня</a>
</div>

<style>
.kvasov-box-gradient {display: flex;justify-content: center;align-items: center;align-content: center;flex-wrap: wrap;width: 95%;margin: auto;font-family: 'Comfortaa', cursive;}
.kvasov-btn-gradient {margin: 10px;padding: 20px;text-align: center;transition: 0.5s;background-size: 200% auto;color: white;box-shadow: 0 2px 20px -5px grey;border-radius: 10px;cursor: pointer;font-weight: 600;
 }
 .kvasov-btn-gradient:hover {background-position: right center; /* изменить направление движения цвета можно здесь */color: #ffffff;}
 .btn-color-1 {background-image: linear-gradient(to right, #f6d365 0%, #fda085 51%, #f6d365 100%);}
 .btn-color-2 {background-image: linear-gradient(to right, #fbc2eb 0%, #a6c1ee 51%, #fbc2eb 100%);}
 .btn-color-3 {background-image: linear-gradient(to right, #84fab0 0%, #8fd3f4 51%, #84fab0 100%);}
 .btn-color-4 {background-image: linear-gradient(to right, #a1c4fd 0%, #c2e9fb 51%, #a1c4fd 100%);}
 .btn-color-5 {background-image: linear-gradient(to right, #ffecd2 0%, #fcb69f 51%, #ffecd2 100%);}
</style>
Наведи на меня Наведи на меня Наведи на меня Наведи на меня Наведи на меня

Залишити свій коментар:

Досвід у веброзробці:

2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2009
2023