Загрузка...

Как мне перенести такой-же эффект при клике кнопки на Lolzе

Тема в разделе Frontend создана пользователем Kolia1_1 1 апр 2021. 172 просмотра

  1. Kolia1_1
    Kolia1_1 Автор темы 1 апр 2021 Безумно можно через стены 27 25 сен 2019
    [IMG]

    Сама кнопка есть, не хватает только таково эффекта при клике


    css
    Код
    .button.primary:active {
    background-color: rgb(34,142,93);
    background-size: 100%;
    transition: background 0s;
    }
    .button.primary:hover {
    background: rgb(58, 169, 119) radial-gradient(circle, transparent 1%, rgb(58, 169, 119) 1%) center/15000%;
    }
    .button:active {
    text-decoration: none;
    background-color: rgb(54, 54, 54);
    background-size: 100%;
    transition: background 0s;
    line-height: 36px;
    }
    .button:hover {
    text-decoration: none;
    background: rgb(45, 45, 45) radial-gradient(circle, transparent 1%, rgb(45, 45, 45) 1%) center/15000%;
    }
    .button.primary {
    color: #f5f5f5;
    background-color: rgb(34,142,93);
    }
    .button.full {
    width: 100%;
    display: block;
    }
    a.callToAction, .callToAction {
    width: 180px;
    }
    a:hover {
    text-decoration: underline;
    cursor: pointer;
    }
    .button {
    font-size: 13px;
    color: rgb(214, 214, 214);
    text-decoration: none;
    background-color: rgb(54, 54, 54);
    background-position: center;
    padding: 0px 15px;
    border-style: none;
    border-radius: 3px;
    user-select: none;
    font-style: normal;
    text-align: center;
    outline: none;
    line-height: 34px;
    display: inline-block;
    cursor: pointer;
    box-sizing: border-box;
    vertical-align: top;
    -webkit-appearance: none !important;
    font-weight: 600;
    transition: background 0.8s;
    overflow: hidden;
    height: 34px;
    }
     
  2. Cyberslave
    Cyberslave 1 апр 2021 40 17 июн 2020
    У js есть контролер событий на отжатие кнопки, юзай)
     
  3. Majejfjfkfkd
    Majejfjfkfkd 3 апр 2021 1 17 дек 2020
    через :hover задай нужный цвет, округлость эффекта пропиши через radius и overflow:hidden;
     
Загрузка...
Top