Code đăng bài viết dạng menu thông báo ẩn hiện đầu & cuối trang blogspot

ɡɩλ✿ßảσ︵²ᵏ⁶ : Viết Blog Truyền Thông, Thiết Kế Đồ Họa Quảng Cáo, Làm Video Marketing.
  • Quảng bá sản phẩm Thớt Gỗ
  • Giới thiệu công ty cung cấp, ván ghép theo yêu cầu , tới các doanh nghiệp chuyên sản xuất đồ gỗ nội thất, mộc gia dụng & đơn vị chuyên thi công lắp đặt Nhà Gỗ.
  • Thông Điệp : Vật Liệu Xanh, Bảo Vệ Môi Trường.

    Hôm nay Gia Bảo Blog chia sẻ code tạo Sticky - thông báo có định trên trang đăng bài viết - Sticky được hiển thị nội dung cố định ở vị trí đầu - cuối trang khi xem nội dung trên bài viết blogspot cụ thể  :

    Code hiển thị khi kéo đến vị trí cụ thể :

    <style>
    #stickThis {
        padding: 5px;
        background-color: #ccc;
        font-size: 1.5em;
        width: 300px;
        text-align: center;
        font-weight: bold;
        border: 2px solid #444;
        -webkit-border-radius: 10px;
        border-radius: 10px;
    }
    #stickThis.stick {
        margin-top: 0;
        position: fixed;
        top: 0;
        z-index: 9999;
        -webkit-border-radius: 0 0 10px 10px;
        border-radius: 0 0 10px 10px;
    }

      </style>
     
      <div id="stick-here"></div>
    <div id="stickThis">Sticky note</div>

    <script>
        function sticktothetop() {
        var window_top = $(window).scrollTop();
        var top = $('#stick-here').offset().top;
        if (window_top > top) {
            $('#stickThis').addClass('stick');
            $('#stick-here').height($('#stickThis').outerHeight());
        } else {
            $('#stickThis').removeClass('stick');
            $('#stick-here').height(0);
        }
    }
    $(function() {
        $(window).scroll(sticktothetop);
        sticktothetop();
    });
    </script>

    Code Stiky cố định 4 Vị trí trái phải đầu, cuối trang bài viết Blog Spot  :

    <!-- Css Float button left, right, top, bottom -->
    <style>
    .float-contact-phai {
    position: fixed;
    bottom: 40px;
    left: 50%;
    z-index: 99999;

    </style>
    <style>
    .float-contact {
    position: fixed;
    top: 25px;
    left: 50%;
    z-index: 99999;
    }
    .chat-zalo {
    background: #8eb22b;
    border-radius: 20px;
    padding: 0 18px;
    color: white;
    display: block;
    margin-bottom: 6px;
    }
    .chat-face {
    background: #125c9e;
    border-radius: 20px;
    padding: 0 18px;
    color: white;
    display: block;
    margin-bottom: 6px;
    }
    .float-contact .hotline {
    background: #d11a59!important;
    border-radius: 20px;
    padding: 0 18px;
    color: white;
    display: block;
    margin-bottom: 6px;
    }
    .chat-zalo a, .chat-face a, .hotline a {
    font-size: 18px;
    color: white;
    font-weight: 400;
    text-transform: none;
    line-height: 0;
    }
    }</style>
    <!--
    Chen code sau duoi style nếu không cho hiển thị tren dien thoai
    @media (max-width: 549px){ .float-contact{ display:none }
    -->

    <!-- Css Float button left, right, top, bottom -->

    <!-- Html Float button left, right, top, bottom -->
    <div class='float-contact-phai'>
    <!-- Code quảng cáo random -->
    Cuối trang
      </div>

    <div class='float-contact'>
    <!-- Code quảng cáo random -->
      Đầu Trang
    </div>
    <!-- End Html Float button left, right, top, bottom -->   

    Code chèn thanh ngang cố định khi scroll chuột  :

    <!-- Thanh ngang co dinh khi sroll chuột --> 
    <style>
      nav-codinh {
      position: fixed;
      z-index: 500;
      background: orange;
      color: white;
      padding: 2px 0;
      text-align: center;
      width: 100%;
      font-size: 18px;   

    </style> 
    <nav-codinh>Goghepthanh.com</nav-codinh>
    <!-- End Thanh ngang co dinh khi sroll chuột --> 
     

    Hiển thị nội dung Cuối trang
    Hiển thị nội dung cố định Đầu Trang
    🦊 1 Phút Dành Cho Quảng Cáo 🦊

    Flagship, giá hời, đời cũ, cấu hình ngon, xem phim, chơi game, nghe nhạc cực đã. :

    + Iphone 11 : Xem Tại Đây
    + Iphone 12 : Xem Tại Đây
    + Iphone 13 : Xem Tại Đây

    + Samsung Galaxy S20 FE : Xem Tại Đây
    + Samsung Galaxy S22 Ultra 5G : Xem Tại Đây

    + Vivo V23 5G 8GB/128GB : Xem Tại Đây
    + Vivo V25e 4G 8GB/128GB : Xem Tại Đây

    + Redmi Note 11 Pro 5G : Xem Tại Đây
    + Xiaomi 12 Pro : Xem Tại Đây

    Điện Thoại Giá Rẻ, Chạy Grab, Tài Xế Công Nghệ :

    + Poco M4 Pro : Xem Tại Đây
    + Oppo A54 : Xem Tại Đây
    + Xiaomi Redmi Note 11 : Xem Tại Đây
    + Samsung Galaxy A23 : Xem Tại Đây

    Smartphone Gaming Giá Rẻ, Tải App Kiếm Tiền Online, Cài Đặt Ứng Dụng Học Tập, Giải Trí, Xem Phim Nghe Nhạc, Chơi Game Online, :

    + Tecno Poca 3 : Xem Tại Đây
    + Realme narzo 50i Prime : Xem Tại Đây