Tạo nút liên hệ đẹp mà nhẹ không dùng JS cho WordPress

Tạo nút liên hệ đẹp, nhẹ không dùng js, có hiệu ứng động

Lượn 1 vòng Gu Gồ thấy có rất nhiều web share code tạo nút liên hệ ở góc màn hình, phức tạp có, đơn giản có, mình thích đơn giản gọn nhẹ, nhưng vẫn phải đầy đủ các yếu tố như có hiệu ứng động kích thích click, không dùng js để đỡ nặng web, test hồi lâu thấy code của Mr. Toản là ổn nhất (code gốc tại đây) nên xin phép chế lại 1 chút để gọn nhẹ hơn, demo ở góc phải màn hình luôn nhé!

Code tạo nút liên hệ bằng HTML và CSS có hiệu ứng động không dùng JS

Toàn bộ code như sau, phần style bạn có thể để vậy hoặc tách ra nhét vào style.css hay custom css tuỳ ý nhé :

<div class="vka-wrapper">
   <input id="vkaCheckbox" type="checkbox" class="vka-checkbox">
   <label class="vka" for="vkaCheckbox">
      <i class="icon-cps-vka-menu"></i>
   </label>
   <div class="vka-wheel">
      <a class="vka-action vka-action-1" href="https://www.google.com/maps/place/94+Tr%E1%BA%A7n+Kh%C3%A1t+Ch%C3%A2n,+Thanh+L%C6%B0%C6%A1ng,+Hai+B%C3%A0+Tr%C6%B0ng,+H%C3%A0+N%E1%BB%99i/@21.0089632,105.8606697,17z/data=!3m1!4b1!4m5!3m4!1s0x3135abf871f31a31:0x19a7996eff886f98!8m2!3d21.0089632!4d105.8628584" rel="nofollow" target="_blank" title="Tìm cửa hàng">
         <div class="vka-button vka-button-1"><i class="icon-cps-local"></i></div>
      </a>
      <a class="vka-action vka-action-2" href="tel:0915941741" rel="nofollow" title="Gọi trực tiếp">
         <div class="vka-button vka-button-2"><i class="icon-cps-phone"></i></div>
      </a>
      <a class="vka-action vka-action-3" href="https://www.messenger.com/t/nam.vunam.1" rel="nofollow" target="_blank" title="Chat Facebook">
         <div class="vka-button vka-button-3"><i class="icon-cps-facebook"></i></div>
      </a>
      <a class="vka-action vka-action-4" href="https://zalo.me/0915941741" target="_blank" rel="nofollow" title="Chat Zalo">
         <div class="vka-button vka-button-4"><i class="icon-cps-chat-zalo"></i></div>
      </a>
   </div>
</div>
<style>
.vka-wrapper {
    position: fixed;
    bottom: 5px;
    right: 0;
    z-index: 9999999;
}
 
.vka-checkbox {
    display: none !important;
}
 
.vka {
    width: 60px;
    max-width: unset;
    height: 60px;
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin: 0;
    border-radius: 50%;
    background: #c31d1d;
    box-shadow: 0 3px 6px rgb(0 0 0 / 16%), 0 3px 6px rgb(0 0 0 / 23%);
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 1000;
    overflow: hidden;
    transform: rotate( 0deg );
    -webkit-transition: all .15s cubic-bezier(.15,.87,.45,1.23);
    transition: all .15s cubic-bezier(.15,.87,.45,1.23);
}
 
.vka-checkbox:checked~.vka {
    -webkit-transition: all .15s cubic-bezier(.15,.87,.45,1.23);
    transition: all .15s cubic-bezier(.15,.87,.45,1.23);
    width: 30px;
    height: 30px;
    right: 26px;
    bottom: 35px;
}
 
[class*=icon-cps-] {
    display: inline-block;
    vertical-align: middle;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANoAAAB1CAYAAAAoV//gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ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Qes5D4mDJj+kLpnoQCcG2IdPXEJy7z/WdE01YM2rouPanyhHR1nez7Wcy2FBRoLEcazOLpDlDocWzB8cRSAHazhXWaBDAW00Hvjj+dUvkqLQfbG76kjAyHhCEuFM+by2VSh9UEWDYEQtLaM4Q7sG5kSMxL5ImgCzm4xCJ3IttdanK5pwAzOM9FPPe72Lc8z4/NzG8/hPOd76qyntgvqkMticwnctcFqguoiGwZGRr+fN6Vd4j/TRMyMGMkc+nCMLXbXZsjWNuqvI5bDsL78VPN2MeO2SdLO9/p5qNKO/H3iYwkx6XzytUeX+RtDbzwcQ9dsVtinn/fItrp7Cvn+X/2OkYplE3DiDttGdiUh27GGO352nCU/mdKgDmU2fTzBC5blPOev/cM2o3ckRDFsdEVd6+Gx2G01pmckTFrsDN8kxH9684417LjIVV2KGrs3M3VOVtmjfWOhi0mIJwK0Z6zzNTzwyJOTggU+YPwnurZBu7YADZnxsgWdeRWSI9nn/++Wk+P2FDop34N6wC7Bh9O4HtJfRTa60uAP0iFWNTnaB2r4Y1khuN5mkgAOkkLGugVhnIjurDdJWeIakvSCNCGLSBnePuSgRt1TYixQWd+iHNkhcAMinL7FyPXqXSWPnYl+lb7uBkk/6EweQ24QvkWXMTFifIdFyBnw9Ti71DwPlRc8hvVR/YlimNFjJ6tyHIoH02oDZandoJC+M60dSrVUtv9+WwA6ERfxCeJfw1zZDJ1JIA2Pum+5znRaP5zb3Jx37QThycVvIZXFD4GcKPCN8U5AenNPJDO13DwQv5hvMyHHRU2n23XALNJASvyknGrQi4GgpVI0fuhQn8jxYBNE8Z0QYbkbuzTTDIjBceJ+VavDwL5HIHtIIKKig9qimaoKCCCqAVVFABtIIKKqgAWkEFFUArqKACaAUVVFABtIIKamn0/wIMAGQk2H485FdIAAAAAElFTkSuQmCC)!important;
    background-repeat: no-repeat;
    background-size: 148px;
}
 
.icon-cps-vka-menu {
    width: 50px;
    height: 50px;
    margin: 0 !important;
    background-size: 200px;
    background-position: -155px 0;
}
.vka-checkbox:checked~.vka .icon-cps-vka-menu {
    width: 20px;
    height: 20px;
    margin: 0;
    background-size: 100px;
    background-position: -79px -29px;
}
 
.vka-wheel {
    position: absolute;
    bottom: 15px;
    right: 18px;
    transform: scale(0);
    transform-origin: bottom right;
    transition: all .3s ease;
    z-index: 12;
}
 
.vka-checkbox:checked~.vka-wheel {
    transform: scale(1);
}
 
.vka-wheel .vka-action {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    position: absolute;
    text-decoration: none;
}
 
.vka-wheel .vka-action:hover {
    transform: scale(1.1);
}
 
.vka-wheel .vka-action-1 {
    bottom: 225px;
    right: 0;
}
 
.vka-button {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    float: left;
    padding: 4px;
    border-radius: 50%;
    background: #0f1941;
    box-shadow: 0 1px 3px rgb(0 0 0 / 12%), 0 1px 2px rgb(0 0 0 / 24%);
    font-size: 24px;
    color: White;
    transition: all 1s ease;
    overflow: hidden;
}
 
.icon-cps-local {
    width: 30px;
    height: 30px;
    background-position: -5px -43px;
}

.icon-cps-mail {
    width: 30px;
    height: 30px;
    background-position: -8px -5px;
}
 
.icon-cps-facebook {
    width: 30px;
    height: 30px;
    background-position: -80px -43px;
}
 
.vka-wheel .vka-button-1 {
    background: #0f9d58;
}
 
.vka-wheel .vka-action-2 {
    bottom: 170px;
    right: 0;
}
 
.vka-wheel .vka-button-2 {
    background: #fb0;
}
 
.icon-cps-phone {
    width: 30px;
    height: 30px;
    background-position: -42px -45px;
}
 
.vka-wheel .vka-action-3 {
    right: 0;
    bottom: 115px;
    cursor: pointer;
}
 
.vka-wheel .vka-button-3 {
    background: #006AFF;
}
 
.vka-wheel .vka-action-4 {
    right: 0;
    bottom: 60px;
}
 
.vka-wheel .vka-button-4 {
    background: #2f82fc;
}
 
.icon-cps-chat-zalo {
    width: 30px;
    height: 30px;
    background-position: -47px -5px;
    background-size: 155px;
}
 
.hidden {
    display: none!important;
}
 
.align-items-center {
    -ms-flex-align: center!important;
    align-items: center!important;
    -ms-flex-pack: distribute!important;
    justify-content: space-around!important;
    display: -ms-flexbox!important;
    display: flex!important;
    -webkit-box-align: center!important;
    -ms-flex-align: center!important;
    align-items: center!important;
}
 
 
.vka-checkbox:not(:checked)~.vka {
    animation-name: zoom;
    -webkit-animation-name: zoom;
    animation-delay: 0s;
    -webkit-animation-delay: 0s;
    animation-duration: 1.5s;
    -webkit-animation-duration: 1.5s;
    animation-iteration-count: infinite;
    -webkit-animation-iteration-count: infinite;
    cursor: pointer;
    box-shadow: 0 0 0 0 #c31d1d;
}
 
@-webkit-keyframes tada {
    0% {
        -webkit-transform: scale(1);
        transform: scale(1)
    }
 
    10%,20% {
        -webkit-transform: scale(.9) rotate(-3deg);
        transform: scale(.9) rotate(-3deg)
    }
 
    30%,50%,70%,90% {
        -webkit-transform: scale(1.1) rotate(3deg);
        transform: scale(1.1) rotate(3deg)
    }
 
    40%,60%,80% {
        -webkit-transform: scale(1.1) rotate(-3deg);
        transform: scale(1.1) rotate(-3deg)
    }
 
    100% {
        -webkit-transform: scale(1) rotate(0);
        transform: scale(1) rotate(0)
    }
}
 
@keyframes tada {
    0% {
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1)
    }
 
    10%,20% {
        -webkit-transform: scale(.9) rotate(-3deg);
        -ms-transform: scale(.9) rotate(-3deg);
        transform: scale(.9) rotate(-3deg)
    }
 
    30%,50%,70%,90% {
        -webkit-transform: scale(1.1) rotate(3deg);
        -ms-transform: scale(1.1) rotate(3deg);
        transform: scale(1.1) rotate(3deg)
    }
 
    40%,60%,80% {
        -webkit-transform: scale(1.1) rotate(-3deg);
        -ms-transform: scale(1.1) rotate(-3deg);
        transform: scale(1.1) rotate(-3deg)
    }
 
    100% {
        -webkit-transform: scale(1) rotate(0);
        -ms-transform: scale(1) rotate(0);
        transform: scale(1) rotate(0)
    }
}
 
@-webkit-keyframes zoom {
    0% {
        transform: scale(.9)
    }
 
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px transparent
    }
 
    100% {
        transform: scale(.9);
        box-shadow: 0 0 0 0 transparent
    }
}
 
@keyframes zoom {
    0% {
        transform: scale(.9)
    }
 
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px transparent
    }
 
    100% {
        transform: scale(.9);
        box-shadow: 0 0 0 0 transparent
    }
}
</style>

Nhớ thay các thông tin như số điện thoại, link map, link messenger đi nhé! Bạn nào ko muốn dùng icon local thì ở dòng 8 có thể thay icon-cps-local thành icon-cps-mail để đổi thành icon email nhé 😀

Chèn code tạo nút liên hệ trên vào flatsome

Nếu dùng theme flatsome, các bạn vào Flatsome –> Advanced –> Global Setting –> chèn code vào phần Footer Script

Phần code ở trong <style></style> bạn có thể tách ra cho vào Flatsome –> Advanced –> Custom Css hoặc để nguyên ko tách cũng đc.


Dùng flatsome mà ko thích nó che mất cái nút back to top thì các bác sửa css nút ấy đi tí nhé

.back-to-top {
    bottom: 90px;
    right: 18px;
}

Chèn code tạo nút liên hệ trên vào mọi web WordPress

Đối với mọi web WordPress dùng theme bất kỳ không phải Flatsome, chúng ta sẽ chèn vào file footer.php ở Quản trị –> Giao diện –> Sửa giao diện – tìm file Footer.php ở cột bên phải.

Sau đó chèn code trên lên trên thẻ </body> hoặc </footer> hoặc </html> trong file footer.php

Ah quên mất, trong code trên có 1 đoạn mã dài loằng ngoằng nhìn hơi kinh dị thì nó là cái ảnh mã hoá base64 thôi nhé, ko phải “vi dút” đâu =))), nếu bạn ko thích thì tải ảnh này về và thay vào nhé!

Bài viết cùng chủ đề:
guest
7 Bình luận
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Linh
Linh
1 Năm ago

Mình muốn thay biểu tượng facebook thành biểu tượng Messenger của facebook thì lấy class ở đâu bạn nhỉ?

son
son
1 Năm ago

code có chút vấn đề là div.vka-wheel khi mở ra khá to, mặc dù ẩn background nhưng nếu nội dung web có link trong khung đó sẽ không click được.
Còn lại thì ngon 😀 bác update thêm nha.

son
son
Reply to  son
1 Năm ago

cái này đổi width từ 300 sang 50px là được
.vka-wheel {
width: 50px;

Việt Lê
Việt Lê
1 Năm ago

Em muốn thêm icon thì phải chỉnh sửa gì hả bác? E muốn tầm 5-6 icon