Friday, July 13, 2012

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



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ả!
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 nhận xét

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

 
© Sổ ghi chú
Designed by BlogThietKe Cooperated with Duy Pham
Released under Creative Commons 3.0 CC BY-NC 3.0
Posts RSSComments RSS
Back to top