Code qu?ng c�o ch?y d?c khi k�o chu?t cho Blogspot website.Code qu?ng c�o ch?y theo khi k�o chu?t xu?ng ph�a d�?i.Code qu?ng c�o ban �?u n� s? c? �?nh m?t ch?, sau khi k�o chu?t xu?ng m?t kho?ng nh?t �?nh th? n� tr�?t theo, khi k�o chu?t l�n th? t?i �i?m d?ng l� n� ko theo n?a
Code qu?ng c�o ch?y d?c khi k�o chu?t cho Blogspot
B�?c 1: ��ng nh?p blogspot => M?u(Template) ==> Ch?nh s?a HTML
B�?c 2: T?m th? ��ng </head> r?i th�m �o?n code d�?i l�n tr�n n�
R?i l�u l?i.
Ch� ?: C�c b?n c?n ch� ? c�c ph?n sau
- <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js' type='text/javascript'/> //n?u web,blog c?a b?n c� r?i th? c� th? b? �i.(n?u ko ch?y dc c�c b?n c?ng th? x�a c�i n�y �i)
<script>
- var $stickyHeight = 460; // chi?u cao c?a banner qu?ng c�o
- var $padding = 5; // kho?ng c�ch top c?a banner khi d�nh
- var $topOffset = 2500; // kho?ng c�ch t? top c?a banner khi b?t �?u d�nh (t?c l� kho?ng c�ch t�nh t? tr�n xu?ng �?n v? tr� �?t banner )
- var $footerHeight = 180; // �?nh v? �i?m d?ng c?a banner, t�nh t? ch�n l�n
B�?c 3: C�c b?n v�o ph?n B? C?c (Layout) => Th�m ti?n �ch HTML/Javascipt
Ch� ? ph?n th? n�y c�c b?n ph?i th�m ��ng ch? nh�. Th�?ng n� s? th�m v�o ph?n thanh ph�n ph?i ho?c b�n tr�i.
C�c b?n �?t t�n ti?n �ch v� th�m code d�?i ��y v�o
Code qu?ng c�o ch?y d?c khi k�o chu?t cho Blogspot
B�?c 1: ��ng nh?p blogspot => M?u(Template) ==> Ch?nh s?a HTML
B�?c 2: T?m th? ��ng </head> r?i th�m �o?n code d�?i l�n tr�n n�
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js' type='text/javascript'/>
<script>
var $stickyHeight = 250;
var $padding = 0;
var $topOffset = 810;
var $footerHeight = 100;
/* <![CDATA[ */
function scrollSticky(){
if($(window).height() >= $stickyHeight) {
var aOffset = $('#sticky').offset();
if($(document).height() - $footerHeight - $padding < $(window).scrollTop() + $stickyHeight) {
var $top = $(document).height() - $stickyHeight - $footerHeight - $padding - 185;
$('#sticky').attr('style', 'position:absolute; top:'+$top+'px;');
}else if($(window).scrollTop() + $padding > $topOffset) {
$('#sticky').attr('style', 'position:fixed; top:'+$padding+'px;');
}else{
$('#sticky').attr('style', 'position:relative;');
}
}
}
$(window).scroll(function(){
scrollSticky();
});
/* ]]> */
</script>
R?i l�u l?i.
Ch� ?: C�c b?n c?n ch� ? c�c ph?n sau
- <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js' type='text/javascript'/> //n?u web,blog c?a b?n c� r?i th? c� th? b? �i.(n?u ko ch?y dc c�c b?n c?ng th? x�a c�i n�y �i)
<script>
- var $stickyHeight = 460; // chi?u cao c?a banner qu?ng c�o
- var $padding = 5; // kho?ng c�ch top c?a banner khi d�nh
- var $topOffset = 2500; // kho?ng c�ch t? top c?a banner khi b?t �?u d�nh (t?c l� kho?ng c�ch t�nh t? tr�n xu?ng �?n v? tr� �?t banner )
- var $footerHeight = 180; // �?nh v? �i?m d?ng c?a banner, t�nh t? ch�n l�n
B�?c 3: C�c b?n v�o ph?n B? C?c (Layout) => Th�m ti?n �ch HTML/Javascipt
Ch� ? ph?n th? n�y c�c b?n ph?i th�m ��ng ch? nh�. Th�?ng n� s? th�m v�o ph?n thanh ph�n ph?i ho?c b�n tr�i.
C�c b?n �?t t�n ti?n �ch v� th�m code d�?i ��y v�o
<div id="sticky">N?u b?n kh�ng mu?n n� hi?n th? ?nh kh�ng th�i th? l?y code sau
<img src="Link ?nh c?a b?n" width="240px" />
</div>
<div id="sticky">
Code qu?ng c�o c?a b?n
</div>
Code qu?ng c�o ch?y d?c cho blogger
4/
5
Oleh
Unknown