Chủ Nhật, 1 tháng 12, 2019

Hướng dẫn trang trí blog của bạn nhân ngày lễ giáng sinh


Lễ giáng sinh sắp đến rồi vaf các bạn có muốn trang trí cho blog của bạn cây thông nô en , tuyết rơi hãy cùng phong1969blogspot  tạo hiệu ứng  đó nhé .
Các bạn có thể xem demo tại đây 
Đầu tiên các bạn vào  bảng điều khiển blog , chọn chủ đề , chọn chỉnh sửa HTML  . Sau đó các bạn kích vào 1 điểm bất kỳ trong khung chứa code sau đó nhấn Ctrl  + F để tìm thẻ <body> sau đó chèn

 
<script type='text/javascript'>
//<![CDATA[
document.write('<style   type="text/css">body{background:#f5465a;padding-bottom:150px}</style><img  style="position:fixed;z-index:9999;top:0;left:0"  src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCK4sBJqjnKV6eBD0Dvjm5QPOaOE8PdZkF6pwc1LXqzZiupnbzLr55y73PXDfUCTZdI9XqVyPrv6TRRV_kazz5LIqysu9L0loY1Ll2656G_3dfRxY20fH5ebFRLm1s8kXABgzH7hYioRc/s150/top-left.png"/><img  style="position:fixed;z-index:9999;top:0;right:0"  src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinlOasbQNPlqGLH7fZ3bEYONg8ZyjTLaW7PZGp9sGhlw3dudcGQR1uAt9OjyE9uupKfwp3XdUgEOyBZf4eO0vxCvRKhob8wLdvaSFNH97JsUhPZWZN21BhMkOYcB9KsYedih1VsFy6ydI/s150/top-right.png"/><div   style="position:fixed;z-index:9999;bottom:0;left:0;width:100%;height:104px;background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG_ElglC5mNQYg6fK7iHAFqQkXcQBu3YGoLAMnrWhL06hvj4zrB1z7jUnhgbWTXAMcz-dOE6k8B5oMJN-x_4KR_Hutdujns4rCSy7GbKhVwF_hFuydI7pjWapsUER1UaMUnzvFbbEB_Xw/s1600/footer.png)  repeat-x bottom left;"></div><img  style="position:fixed;z-index:9999;bottom:30px;left:30px"  src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGY6p3gPq2n7m3vbLDuVf1fp0Y83bT2SelIaR_4pj4SvoWwccBXRIo7DYZm9KEwFfatasEgQbM8z4_z9dOoboS-sHohY8Rz6LmVw0bBOgmwg4i9_r9pLhuIEdBM8SYA3__0xgV_qJYZZs/s180/bottom-left.png"/>');var  no=100;var hidesnowtime=0;var snowdistance='pageheight';var  ie4up=(document.all)?1:0;var  ns6up=(document.getElementById&&!document.all)?1:0;function  iecompattest(){return(document.compatMode&&document.compatMode!='BackCompat')?document.documentElement:document.body}var  dx,xp,yp;var am,stx,sty;var  i,doc_width=800,doc_height=600;if(ns6up){doc_width=self.innerWidth;doc_height=self.innerHeight}else   if(ie4up){doc_width=iecompattest().clientWidth;doc_height=iecompattest().clientHeight}dx=new  Array();xp=new Array();yp=new Array();am=new Array();stx=new  Array();sty=new  Array();for(i=0;i<no;++i){dx[i]=0;xp[i]=Math.random()*(doc_width-50);yp[i]=Math.random()*doc_height;am[i]=Math.random()*20;stx[i]=0.02+Math.random()/10;  sty[i]=0.7+Math.random();if(ie4up||ns6up){document.write('<div  id="dot'+i+'"  style="POSITION:absolute;Z-INDEX:'+i+';VISIBILITY:visible;TOP:15px;LEFT:15px;"><span   style="font-size:18px;color:#fff">*</span><\/div>')}}function   snowIE_NS6(){doc_width=ns6up?window.innerWidth-10:iecompattest().clientWidth-10;doc_height=(window.innerHeight&&snowdistance=='windowheight')?window.innerHeight:(ie4up&&snowdistance=='windowheight')?iecompattest().clientHeight:(ie4up&&!window.opera&&snowdistance=='pageheight')?iecompattest().scrollHeight:iecompattest().offsetHeight;for(i=0;i<no;++i){yp[i]+=sty[i];if(yp[i]>doc_height-50){xp[i]=Math.random()*(doc_width-am[i]-30);yp[i]=0;stx[i]=0.02+Math.random()/10;sty[i]=0.7+Math.random()}dx[i]+=stx[i];document.getElementById('dot'+i).style.top=yp[i]+'px';document.getElementById('dot'+i).style.left=xp[i]+am[i]*Math.sin(dx[i])+'px'}snowtimer=setTimeout('snowIE_NS6()',10)}function   hidesnow(){if(window.snowtimer){clearTimeout(snowtimer)}for(i=0;i<no;i++)document.getElementById('dot'+i).style.visibility='hidden'}if(ie4up||ns6up){snowIE_NS6();if(hidesnowtime>0)setTimeout('hidesnow()',hidesnowtime*1000)}
//]]>
</script>
 

Thứ Ba, 22 tháng 10, 2019

Trang trí giáng sinh với Ông già Noel cho Blogspot

Trời dần chuyển lạnh như đang chào đón những ngày Noel sắp đến. Chúng ta đã dần cảm thấy cuộc sống xung quanh như đang chuẩn bị chào đón ngày Giáng sinh này. Các bạn có thể thấy ở rất nhiều cửa hàng, trung tâm thương mại đã trang hoàng để chào đón giáng sinh. Đó là ở bên ngoài, bước lên mạng internet, sẽ không có gì lạ khi bắt gặp những trang web đã thay đổi một giao diện tràn ngập giáng sinh. Vậy những Blogger như chúng ta cũng phải theo cho kịp xu thế chứ?
Vì vậy hôm nay mình  sẽ hướng dẫn các bạn cách tạo Ông già Noel bay trên trang Blogspot của mình để góp phần trang trí website chào đón ngày Giáng sinh sắp đến. Cách thực hiện vô cùng đơn giản, chẳng tốn nhiều công sức hay gây khó khăn cho bất kỳ Blogger nào. Cùng theo dõi nhé:
– Truy cập vào trang quản trị Blogger, tiếp tục vào Mẫu (Template), chọn Chỉnh sửa HTML (Edit HTML)
– Click vào vùng code, tìm đoạn code sau: </body>
– Sau đó thêm đoạn code này vào ngay bên trên nó, đây chính là đoạn code tạo Ông già Noel với đàn tuần lộc bay qua bay lại trên blog của các bạn:

<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js' type='text/javascript'></script>
<script type='text/javascript'>
//<![CDATA[
$(function(){
$('html').append('<img id="halo" title="Happy Noel" style="cursor:pointer;position:fixed;z-index:99999" height="120" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxsyVwLESrxNCY9iU96F2MFP1C_0qiKEXOJewzUMd3TR2XAMv6AjOCxW9jbfG0ZOe7Ki6ILaf6F1sGHpl3fNoatSbPOKYrhoROz5WUZhaDoZ7OQoVTPicM09KHhN3lZ6P9twc73cssO8M/s1600/tuan_loc_cho_qua_cua_ong_gia_noel_anh.gif"/>')
setInterval(function(){
var $X=Math.ceil(Math.random()*$(window).width())
var $Y=Math.ceil(Math.random()*$(window).height())
$('img#halo').animate({'left':$X,'top':$Y},5000)
},5000)
$('img#halo').click(function(){
window.open('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxsyVwLESrxNCY9iU96F2MFP1C_0qiKEXOJewzUMd3TR2XAMv6AjOCxW9jbfG0ZOe7Ki6ILaf6F1sGHpl3fNoatSbPOKYrhoROz5WUZhaDoZ7OQoVTPicM09KHhN3lZ6P9twc73cssO8M/s1600/tuan_loc_cho_qua_cua_ong_gia_noel_anh.gif','')
})
})
//]]>
</script> 

Chú ý, nếu blog của bạn đã có 1 đoạn js tương tự (không cần giống phiên bản 1.10.2) thì bạn nên bỏ đoạn js màu xanh của mình đi.

– Lưu lại Cũng trong chủ đề giáng sinh, ở bài viết trước mình đã hướng dẫn cách tạo tuyết rơi rồi, kết hợp với bài viết tạo Ông già Noel  thật thú vị phải không nào. Các bạn  muốn có hiệu ứng tuyết roi cho blogspot thì xem tại đây .

Thứ Sáu, 18 tháng 10, 2019

Tạo hiệu ứng hoa mai rơi cho blogspot


hiệu ứng hoa mai rơi cho blogspot
Tết tết sắp đến rồi . Để cho không khí tết, nừng xuân năm mới ,mình sưu tầm  được đoạn code tạo hiệu ứng hoa mai rơi cho blogspot Ngoài ra các hiệu ứng hoa anh đào rơihiệu ứng lá rơi (khi trời chuyển sang thu), hiệu ứng tuyết rơihiệu ứng sao rơi,…Thì cũng từ một đoạn Code mà ra thôi.
Giờ bắt đầu thủ thuật cùng seo blog.

Vào Blog => Mẫu => Chỉnh sửa HTML. Nhấn tổ hợp phím Ctrl + F và tìm đến thẻ </head>. Sau đó dán đoạn mã Code sau ở phía trên thẻ </head> và Lưu mẫu.


<script type = 'text/javascript'>
//<![CDATA[
var pictureSrc ="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwabploet374TmsHDcimS70KGnCn_xztVnPYPq-tSNiFvJGAntJu6aEJKurCZU64bZCm0638NA1V0BiVU7JEp657-zxthydRird45DHd7UgLRhkJnK-p6pSZrckLVQvTW1Y2CSU5fEZ_A/s1600/hoamai.png"; //the location of the snowflakes
var pictureWidth = 15; //the width of the snowflakes
var pictureHeight = 15; //the height of the snowflakes
var numFlakes = 10; //the number of snowflakes
var downSpeed = 0.01; //the falling speed of snowflakes (portion of screen per 100 ms)
var lrFlakes = 10; //the speed that the snowflakes should swing from side to side


if( typeof( numFlakes ) != 'number' || Math.round( numFlakes ) != numFlakes || numFlakes < 1 ) { numFlakes = 10; }

//draw the snowflakes
for( var x = 0; x < numFlakes; x++ ) {
if( document.layers ) { //releave NS4 bug
document.write('<layer id="snFlkDiv'+x+'"><imgsrc="'+pictureSrc+'" height="'+pictureHeight+'"width="'+pictureWidth+'" alt="*" border="0"></layer>');
} else {
document.write('<div style="position:absolute; z-index:9999;"id="snFlkDiv'+x+'"><img src="'+pictureSrc+'"height="'+pictureHeight+'" width="'+pictureWidth+'" alt="*"border="0"></div>');
}
}

//calculate initial positions (in portions of browser window size)
var xcoords = new Array(), ycoords = new Array(), snFlkTemp;
for( var x = 0; x < numFlakes; x++ ) {
xcoords[x] = ( x + 1 ) / ( numFlakes + 1 );
do { snFlkTemp = Math.round( ( numFlakes - 1 ) * Math.random() );
} while( typeof( ycoords[snFlkTemp] ) == 'number' );
ycoords[snFlkTemp] = x / numFlakes;
}

//now animate
function flakeFall() {
if( !getRefToDivNest('snFlkDiv0') ) { return; }
var scrWidth = 0, scrHeight = 0, scrollHeight = 0, scrollWidth = 0;
//find screen settings for all variations. doing this every time allows for resizing and scrolling
if( typeof( window.innerWidth ) == 'number' ) { scrWidth = window.innerWidth; scrHeight = window.innerHeight; } else {
if( document.documentElement && (document.documentElement.clientWidth ||document.documentElement.clientHeight ) ) {
scrWidth = document.documentElement.clientWidth; scrHeight = document.documentElement.clientHeight; } else {
if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
scrWidth = document.body.clientWidth; scrHeight = document.body.clientHeight; } } }
if( typeof( window.pageYOffset ) == 'number' ) { scrollHeight = pageYOffset; scrollWidth = pageXOffset; } else {
if( document.body && ( document.body.scrollLeft ||document.body.scrollTop ) ) { scrollHeight = document.body.scrollTop;scrollWidth = document.body.scrollLeft; } else {
if(document.documentElement && (document.documentElement.scrollLeft ||document.documentElement.scrollTop ) ) { scrollHeight =document.documentElement.scrollTop; scrollWidth =document.documentElement.scrollLeft; } }
}
//move the snowflakes to their new position
for( var x = 0; x < numFlakes; x++ ) {
if( ycoords[x] * scrHeight > scrHeight - pictureHeight ) { ycoords[x] = 0; }
var divRef = getRefToDivNest('snFlkDiv'+x); if( !divRef ) { return; }
if( divRef.style ) { divRef = divRef.style; } var oPix = document.childNodes ? 'px' : 0;
divRef.top = ( Math.round( ycoords[x] * scrHeight ) + scrollHeight ) + oPix;
divRef.left = ( Math.round( ( ( xcoords[x] * scrWidth ) - (pictureWidth / 2 ) ) + ( ( scrWidth / ( ( numFlakes + 1 ) * 4 ) ) * (Math.sin( lrFlakes * ycoords[x] ) - Math.sin( 3 * lrFlakes * ycoords[x]) ) ) ) + scrollWidth ) + oPix;
ycoords[x] += downSpeed;
}
}

//DHTML handlers
function getRefToDivNest(divName) {
if( document.layers ) { return document.layers[divName]; } //NS4
if( document[divName] ) { return document[divName]; } //NS4 also
if( document.getElementById ) { return document.getElementById(divName); } //DOM (IE5+, NS6+, Mozilla0.9+, Opera)
if( document.all ) { return document.all[divName]; } //Proprietary DOM - IE4
return false;
}

window.setInterval('flakeFall();',100);
//]]>
</script>  
  --
Tùy chỉnh.

·        Bạn muốn hoa anh đào rơi hay lá rơi hay tuyết rơi hay sao rơi,…Thì các bạn chỉ cần thay đổi hình ảnh này https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwabploet374TmsHDcimS70KGnCn_xztVnPYPq-tSNiFvJGAntJu6aEJKurCZU64bZCm0638NA1V0BiVU7JEp657-zxthydRird45DHd7UgLRhkJnK-p6pSZrckLVQvTW1Y2CSU5fEZ_A/s1600/hoamai.png là xong.

·        15 Chiều rộng của bông.

·        15 Chiều cao của bông.

·        10 Số bông hoa xuất hiện cùng một lúc.

·        0,01 Tốc độ rơi của các bông hoa.

·        10 Tốc độ các bông hoa giao động từ bên trái sang bên phải và ngược lại.

Nếu bạn thích bài viết này, hãy subscribe blog của tôi để thường xuyên cập nhật những bài viết hay nhất, mới nhất qua email nhé. Cảm ơn rất nhiều .