Xenforo Quảng cáo ở góc dưới trồi lên

Thảo luận trong 'Thiết kế Website' bắt đầu bởi Lưu Đình Giáp, 13/8/14.

Lượt xem: 1,416

  1. Lưu Đình Giáp Administrator

    Code tạo Quảng Cáo ở góc dưới bên phải trồi lên
    Demo: http://tayninh24h.vn/
    Cách làm: Pạn mở temp Footer lên và chèn đoạn code dưới đây vào dưới cùng nhé!
    Mã:
    <!--Quang cao-->
    <style type="text/css">
    * html div#habifl {position: absolute; overflow:hidden;
    top:expression(eval(document.compatMode &&
    document.compatMode=='CSS1Compat') ?
    documentElement.scrollTop
    +(documentElement.clientHeight-this.clientHeight)
    : document.body.scrollTop
    +(document.body.clientHeight-this.clientHeight));}
    #habifl{font: 12px Arial, Helvetica, sans-serif; color:#333333; position:fixed; _position: absolute; right:0; bottom:0; height:90px; }
    #habieb{ width:300px; padding-right:1px; repeat-x right top;border: dashed 0px; color:#690; }
    #habicob{background-color:#000;height:200px; border: dashed 0px;}
    #habicoc li a{background-image:url(http://i.imgur.com/amSVOhw.gif); background-repeat:no-repeat; width:30px; height:0; padding-top:15px; overflow:hidden; float:left;}
    #habicoh{background-color:#f79d2b;color:#FFF;display:block; height:18px; line-height:18px; font-size:11px; width:300px; }
    #habicoh a{color:#690;text-decoration:none;}
    #habicoc{float:right; padding:0; margin:0; list-style:none; overflow:hidden; height:15px;}
    #habicoc li{display:inline;}
    #habicoc li a.close{background-position: 0 0;}
    #habicoc li a.close:hover{background-position: 0 -15px;}
    #habicoc li a.min{background-position: -30px 0;}
    #habicoc li a.min:hover{background-position: -30px -15px;}
    #habicoc li a.max{background-position: -60px 0;}
    #habicoc li a.max:hover{background-position: -60px -15px;}
    #habico{display:block; margin:0; padding:0 0px 0px 0px; height: 200px; overflow:hidden;}
    </style>
    <div style="height: 200px;" id="habifl" align="center">
    <div id="habieb">
    <div id="habicob">
    <div id="habicoh">
    <ul id="habicoc">
    <li id="habihide"><a class="min" href="javascript:habiclickhide();" title="Ẩn đi">Ẩn</a></li>
    <li id="habishow" style="display: none;"><a class="max" href="javascript:habiclickshow();" title="Hiện lại">Xem </a></li>
    <li id="habiclose"><a class="close" href="javascript:habiclickclose();" title="Đóng lại">Đóng</a></li>
    </ul>
    <b>
    LIÊN HỆ QUẢNG CÁO - MR LƯU: 0933.245.117
    </b>
    </div>
    <div id="habico">
    <!--- Ads --->
    <a href="http://tayninh24h.vn/threads/khuyen-mai-dac-biet-tu-ngay-6-08-2014-den-8-09-2014.100/" target="_blank"><img src="http://i.imgur.com/V8dbhqo.png"/></a>
    <!--- Ads --->
    </div>
    </div></div></div>
    <script>
    habibottomLayer = document.getElementById('habifl');
    var habiIntervalId = 0;
    var habimaxHeight = 200;//Chieu cao khung quang cao
    var habiminHeight = 20;
    var habicurHeight = 0;// chieu cao khi di chuyen
    function habishow( ){
    habicurHeight += 2;
    if (habicurHeight > habimaxHeight){
    clearInterval ( habiIntervalId );
    }
    habibottomLayer.style.height = habicurHeight+'px';
    }
    function habihide( ){
    habicurHeight -= 3;
    if (habicurHeight < habiminHeight){
    clearInterval ( habiIntervalId );
    }
    habibottomLayer.style.height = habicurHeight+'px';
    }
    habiIntervalId = setInterval ( 'habishow()', 5 );
    function habiclickhide(){
    document.getElementById('habihide').style.display='none';
    document.getElementById('habishow').style.display='inline';
    habiIntervalId = setInterval ( 'habihide()', 5 );
    }
    function habiclickshow(){
    document.getElementById('habihide').style.display='inline';
    document.getElementById('habishow').style.display='none';
    habiIntervalId = setInterval ( 'habishow()', 5 );
    }
    function habiclickclose(){
    document.body.style.marginBottom = '0px';
    habibottomLayer.style.display = 'none';
    }
    </script>
    Ok! vậy là xong, rất đơn giản. Chúc bạn thành công!
     
  2. Bình Luận Bằng Facebook





VIDEO ĐANG ĐƯỢC XEM NHIỀU:


Bấm SUBSCRIBE LIKE ngay để được xem nhiều video hơn: