-------------LỜI CHÚC--------------

----------TÀI NGUYÊN---------

----------DANH NGÔN----------

-------------LIÊN KẾT-------------

TRUYỆN CƯỜI

-------------Thống kê------------

  • truy cập   (chi tiết)
    trong hôm nay
  • lượt xem
    trong hôm nay
  • thành viên
  • -Thành viên trực tuyến-

    1 khách và 0 thành viên

    Chào mừng quý vị đến với website của ...

    Quý vị chưa đăng nhập hoặc chưa đăng ký làm thành viên, vì vậy chưa thể tải được các tài liệu của Thư viện về máy tính của mình.
    Nếu chưa đăng ký, hãy nhấn vào chữ ĐK thành viên ở phía bên trái, hoặc xem phim hướng dẫn tại đây
    Nếu đã đăng ký rồi, quý vị có thể đăng nhập ở ngay phía bên trái.
    Gốc > CODE CHO BLOG >

    TẠO 2 THANH TRƯỢT DỌC HAI BÊN BLOG

    Mình xin giới thiệu đoạn code ,đã chỉnh sửa lại tạo 2 trượt bên trong blog.Các bạn nhớ chỉnh sửa "lètt-right" sao cho phù hợp với các độ phân giải của mản hình mình nha( nhớ dùng firfox).

    <style type="text/css">

    float {

    width: 115px;

    height: 200px;

    border: solid 1px blue; }
        </style>
                    <div style="width: 0px;height: 0px;">

                <div id="a" class="float"><a href=" http://dinhnguyenhong.violet.vn "><img src=' http://cB2.upanh.com/19.0.24743881.RzX0/doi2201x700.jpg'></div>

                            <div id="c" class="float"><a href=" http://dinhnguyenhong.violet.vn"><img src=' http://cB9.upanh.com/19.0.24743788.Z780/doi1201x700.jpg '></div>

    </div>         
    <script type="text/javascript">



    function setPosition(id, position) {



    var store = {

    ram : {

    top : 0,

    left : 0,

    right : 0,

    bottom : 0

    },

    rom : {

    top : null,

    left : null,

    right : null,

    bottom : null

    }

    };





    for (var i in position) {store.rom[i] = position[i];}



    var element = document.getElementById(id);



    for (i in store) {element[i] = store[i];}



    element.rom.move = function() {



    if (window.innerHeight) {

    var topPage = window.pageYOffset;

    var leftPage = window.pageXOffset;

    var rightPage = leftPage + window.innerWidth - element.offsetWidth;

    var bottomPage = topPage + window.innerHeight - element.offsetHeight;

    }

    else {

    var topPage = document.body.scrollTop;

    var leftPage = document.body.scrollLeft;

    var rightPage = leftPage + document.body.clientWidth - element.offsetWidth;

    var bottomPage = topPage + document.body.clientHeight - element.offsetHeight;

    }

    element.style.position = "absolute";



    if (element.rom.top != null) {

    element.ram.top += Math.round((topPage + element.rom.top - element.ram.top)/20);

    element.style.top = element.ram.top;

    }

    if (element.rom.left != null) {

    element.ram.left += Math.round((leftPage + element.rom.left - element.ram.left)/20);

    element.style.left = element.ram.left;

    }

    if (element.rom.right != null) {

    element.ram.right += Math.round((rightPage - element.rom.right - element.ram.right)/20);

    element.style.left = element.ram.right;

    }

    if (element.rom.bottom != null) {

    element.ram.bottom += Math.round((bottomPage - element.rom.bottom - element.ram.bottom)/20);

    element.style.top = element.ram.bottom;

    }

    setTimeout("document.getElementById('"+element.id+"').rom.move()",10);

    };

    element.rom.move();

    }

    setPosition("a", {top: 20, right: 30});



    setPosition("c", {top: 20, left: 30});

    </script>

     

    Chúc thành công .


    Nhắn tin cho tác giả
    Nguyễn Hồng Dĩnh @ 08:22 11/04/2011
    Số lượt xem: 230
    Số lượt thích: 0 người
     
    Gửi ý kiến

    Mở hộp chat