logo

Widgets réseaux sociaux

Html

<div class="container">
    <div class="social-widget">
        <div class="icon-bar">
            <a href="#" class="email" target="_blank"><i class="fa fa-envelope"></i></a>
            <a href="#" class="facebook" target="_blank"><i class="fab fa-facebook-f"></i></a>
            <a href="#" class="youtube" target="_blank"><i class="fab fa-youtube"></i></a>
            <a href="#" class="instagram" target="_blank"><i class="fab fa-instagram"></i></a>
        </div>
    </div>
</div>

CSS

.social-widget .icon-bar {
    position: fixed;
    top: 50%;
    right: 0px; /* Changer right en left pour changer de côté */
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

.social-widget .icon-bar a {
    display: block;
    text-align: center;
    padding: 10px 15px 10px 15px;
    margin: 10px 10px 10px 10px; /* Mets de l'éspace entre les icônes */
    transition: all 0.3s ease;
    color: white;
    font-size: 20px;
    border-radius: 50%; /* Arrondi les icônes */
}

.social-widget .icon-bar a:hover {
    opacity: 0.5;
}

.social-widget .email {
    background: #50b550;
    color: white;
}

.social-widget .facebook {
    background: #3B5998;
    color: white;
}

.social-widget .youtube {
    background: #bb0000;
    color: white;
}

.social-widget .instagram {
    background: #c436a4;
    color: white;
}