Theo yêu cầu của bạn Ngân (www.blogtruyen.com)

Xem DEMO
(lưu ý : nếu bạn không thấy banner quảng cáo thì zoom nhỏ lại (Ctrl -) banner sẽ hiển thị, nếu muốn test không hiển thị thì zoom lớn lên (Ctrl +))
Hình ảnh minh họa :

☼ Các bước thực hiện :
1. Vào bố cục
2. Vào chỉnh sửa code HTML
3. Chèn đoạn code bên dưới vào trước thẻ đóng </head>
<style type="text/css">
.slideads1 {text-align:left}
.slideads2 {text-align:right}
</style>
4. Save template.
5. Tạo 1 widget HTML/javascript và dán code bên dưới vào:
<div id="divAdLeft" style="position: absolute; width: 110px; float: left; left: 0pt; top: 0.00000103038px;">
<div class="slideads1">
<a href="http://www.fandung.com/"><img src="link banner 1" border="0"></a>
</div>
</div>
<div id="divAdRight" style="position: absolute; width: 120px; float: right; left: 989px; top: 0.00000100252px;">
<td class="slideads2">
<a href="http://www.fandung.com/" target="_blank"><img src="link banner 2" border="0"></a>
</div>
</div>
<script language="JavaScript" src="http://data.fandung.com/js/slide_ads.js"></script>
- Ngoài ra code ở bước 5 ta có thể dán nó thẳng vào trong code template.
- Lưu ý : file JS http://data.fandung.com/js/slide_ads.js luôn phải đặt ở vị trí sau cùng của code thủ thuật. Tức là phải load phần code HTML trước phần code JS.
Ở thủ thuật này, với màn hình có độ phân giải trên 1024px thì banner mới hiển thị. Chi tiết có thể xem trong file slide_ads.js
Chúc các bạn thành công.
{ 0 nhận xét... read them below or add one }
Đăng nhận xét