</positions>
Thêm bên trên
<position>
<name>FIX_BANNER_LEFT</name>
<tag>[FIX_BANNER_LEFT]</tag>
</position>
<position>
<name>FIX_BANNER_RIGHT</name>
<tag>[FIX_BANNER_RIGHT]</tag>
</position>
.fix_banner_left {
width:120px;
height:480px;
position:fixed;
top:2px;
left:2px;
display:none;
}
.fix_banner_right {
width:120px;
height:480px;
position:fixed;
top:2px;
right:2px;
display:none;
}
function fix_banner_center() {
var a = Math.round((winX - 1130) / 2);
0 <= a ? ($("div.fix_banner_left").css("left", a + "px"), $("div.fix_banner_right").css("right", a + "px"), a = Math.round((winY - $("div.fix_banner_left").height()) / 2), 0 >= a && (a = 0), $("div.fix_banner_left").css("top", a + "px"), a = Math.round((winY - $("div.fix_banner_right").height()) / 2), 0 >= a && (a = 0), $("div.fix_banner_right").css("top", a + "px"), $("div.fix_banner_left").show(), $("div.fix_banner_right").show()) : ($("div.fix_banner_left").hide(), $("div.fix_banner_right").hide())
}
$(function() {
fix_banner_center();
});
$(window).on("resize", function() {
fix_banner_center();
});
Chú ý: Trong đoạn code này, bạn có thể điều chỉnh thông số 1130 để thay đổi khoảng cách giữa khối quảng cáo so với nội dung.
</body>
Thêm bên trên
<div class="fix_banner_left">[FIX_BANNER_LEFT]</div>
<div class="fix_banner_right">[FIX_BANNER_RIGHT]</div>
Hoàn tất, bây giờ, bạn đã có thể đăng nhập quản trị, bật kéo thả block, sẽ thấy hai khối block này xuất hiện. Bạn có thể thêm nội dung tùy ý vào đây bằng cách thêm block cho hai khối này.Những tin mới hơn
Những tin cũ hơn
Trung tâm ứng dụng NukeViet
Ghi rõ nguồn khi sao chép thông tin từ website này.
Sử dụng CMS NukeViet, thiết kế bởi TDFOSS.,LTD