Home » » Thêm ảnh luôn xuất hiện trên cùng trong blog

Thêm ảnh luôn xuất hiện trên cùng trong blog

Written By Rurutomi Vanduc on Thứ Sáu, 13 tháng 7, 2012 | 02:55



Nếu bạn muốn một tấm ảnh luôn xuất hiện trên màn hình của trang blog mình dù người đọc có scroll chuột lên hay xuống, thủ thuật sau đây sẽ giúp bạn:



Bước 1: Tìm sẵn một ảnh và đưa lên host (khoảng 125x125 pixels). Ví dụ:
Bước 2: Đăng nhập vào tài khoản của bạn, chọn Edit HTML, nhớ chọn Expand Widget Tempplates, tìm dòng ]>></b:skin>, đặt đoạn code sau đây vào phía trên nó:
________________________________________________________
#top_image {
position:fixed;
_position:absolute;
bottom:5px;
left:5px;
clip:inherit;
_top:expression(document.documentElement.scrollTop+
document.documentElement.clientHeight-this.clientHeight);
_left:expression(document.documentElement.scrollLeft+ document.documentElement.clientWidth - offsetWidth); }

Bạn có thể thay đổi giá trị màu đỏ theo ý của mình.
Tiếp tục tìm đến thẻ </body>, đặt code sau ở phía trên nó:
<div id='top_image'>
<img border='0' src='<img border='0' src='http://i117.photobucket.com/albums/o70/Babothanlong/icon3.gif?imgmax=800'/>
</div>
________________________________________________________


Nhớ thay đoạn code:
<img border='0' src='http://i117.photobucket.com/albums/o70/Babothanlong/icon3.gif
thành địa chỉ hình của bạn.

Cuối cùng save template để xem kết quả!
Hãy chia sẻ kiến thức này :

Đăng nhận xét

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Rurutomi's Blog - All Rights Reserved
Template Created by Creating Website - Edit by Mua Rẻ Đức Kiên
Proudly powered by Blogger