Tạo nút cuộn lên đầu trang

Thứ tư - 07/04/2021 10:12 668
Bước 1: Thêm đoạn css này vào file style css chính của bạn
.car-top { width: 62px; position: fixed; bottom: -180px; right: 30px; z-index: 9999; opacity: 1; cursor: pointer; }.car-top.show { bottom: 5% !important; -webkit-transition: 1.0s; -moz-transition: 1.0s; transition: 1.0s; }.car-top.car-run { bottom: 100% !important; -webkit-transition: 1.0s; -moz-transition: 1.0s; transition: 1.0s; }.car-top.car-down { -webkit-transition: 1.0s; -ms-transition: 1.0s; -o-transition: 1.0s; -moz-transition: 1.0s; transition: 1.0s; }.car-top:before, .car-top:after { content: ""; position: absolute; -o-transition: 0.2s; -webkit-transition: 0.2s; -ms-transition: 0.2s; -moz-transition: 0.2s; transition: 0.2s; opacity: 0; }.car-top:hover:before, .car-top:hover:after, .car-top.car-run:before, .car-top.car-run:after { opacity: 1; }.car-top:before, .car-top.car-run:before { top: -1px; left: -7px; width: 70px; height: 54px; background: url(../images/car-focus.png) no-repeat 0 0; }.car-top img{width:60px;}
Bước 2: chèn đoạn html này vào cuối trang trên thẻ
Tức là mở file themes/theme_bạn/layout/footer_only.tpl
Bước 3: úp 2 hình đính kèm vào thư mục theme của bạn
Lưu tất cả lại và hưởng thụ thành quả
 

THÔNG TIN GÓP Ý
        Quý thầy cô hoặc bạn đọc muốn đóng góp tài liệu, vui lòng gửi về:
    Fanpage: https://www.facebook.com/linhhoitrithuc (Chia sẻ tài nguyên miễn phí)
    Email: linhhoitrithuc@gmail.com  
Thống kê truy cập
  • Đang truy cập7
  • Hôm nay1,480
  • Tháng hiện tại69,904
  • Tổng lượt truy cập1,050,273
GIÁO ÁN THEO CHỦ ĐỀ
ĐỀ THI HK 2 TIỂU HỌC
giáo án theo công văn 5512
facebook
Bạn đã không sử dụng Site, Bấm vào đây để duy trì trạng thái đăng nhập. Thời gian chờ: 60 giây