Сейчас узнаем, какой подарок выпадет именно Вам
Крутите колесо
Ура, вы выиграли!
Ваш приз:
Годовой доступ
к видео на mo-ti -20%
по промокоду T19RAY
Промокод действителен 3 дня

Оформить доступ с промокодом
100
Как добавить кнопку при наведении в блок FR304 в Тильда

ART SILVER THE PLATED

Everyday we work hard to make life of our clients better and happier

Как добавить кнопку при наведении в блок FR304 в Тильда

1
Создали блок FR304 на 3 карточки
И задали ему класс uc-tab-button
2
Добавили код в блок другое Т123
Ссылки для картинок
https://yandex.ru
https://google.ru
https://mail.ru
Библиотека для примера

<script>

(function () { 
    const linkList = [
        'https://yandex.ru',
        'https://google.ru',
        'https://mail.ru',
    ];
    
    const imageBox = document.querySelectorAll('.uc-tab-button .t908__box-img');
    
    imageBox.forEach(function (el, index) {
        const imageBoxHtml = el.outerHTML;
        const imageBoxWrapper = `<a target="_blank" href="${linkList[index]}">${imageBoxHtml}</a>`;
        el.outerHTML = imageBoxWrapper;
    });

})();
   
</script>


<style>
.t908__box-img:before { 
    transition: all ease-in-out .25s
}
.t908__img{ 
    transition: all ease-in-out .85s
}  
.t908__box-img {
    position: relative;
    overflow: hidden;
}
.t908__box-img_active {
    display: flex;
}
.t908__box-img:before {
    content: "Learn More \279C";
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Bebas Neue',Arial,sans-serif;
    font-size: 18px;
    color: #000;
    padding: 12px 30px;
    background-color: #fff;
    border-radius: 7px;
    opacity:0;
    z-index:99;
}
.t908__box-img:hover .t908__img { 
    filter: brightness(0.7);
    transform: scale(1.07);
}
.t908__box-img:hover:before {
    top: 50%;
    opacity:1;
    
}
@media screen and (max-width:980px){
.t908__box-img:before {
    top: 50%;
    opacity:0.6;
}
.t908__img { 
    filter: brightness(0.7)
}
.t908__box-img:hover .t908__img { 
    transform: none;
}
}
</style>


Made on
Tilda