Tạo hộp đăng ký giữa màn hình với hiệu ứng tuyệt đẹp cho Blogspot

Chào các bạn, hôm nay mình sẽ chia sẻ cho các bạn mẫu hộp đăng ký với hiệu ứng ẩn, hiện, tự thay đổi màu nền tuyệt đẹp cho Blogspot. Mẫu này do mình lấy từ Đồng Việt Blog, sau đó chỉnh sửa CSS, Javascript và chia sẻ lại cho các bạn. Xem demo qua ảnh bên dưới, hoặc bấm ra trang chủ của mình để xem nhé.
Tạo hộp đăng ký giữa màn hình với hiệu ứng tuyệt đẹp cho Blogspot

Các bước thực hiện

Bước 1. Đăng nhập Blogger ➔ Chỉnh sửa HTML ➔ Mẫu.
Bước 2. Chèn đoạn CSS sau vào trước thẻ ]]></b:skin> trong template.
#sub-box {display:none;background:rgba(0,0,0,0.5);width:100%;height:100%;position:fixed;top:0;left:0;z-index:99999;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none}
#boxclose {width:100%;height:100%;-webkit-transform:translateZ(0);}
#boxview {border:10px solid rgba(255, 255, 255, 0.2);width:600px;position:absolute;top:33%;left:28%;}
#closebox {float:right;cursor:pointer;position:absolute;right:0;top:0;display:none}
#closebox:before {font-family: FontAwesome;content:&quot;\f00d&quot;;padding:5px 8px;background:#fff;color:#2c3e50;font-weight:normal;font-size:14px;border-radius:0 0 0 10px}
#boxlink,#boxlink a.visited,#boxlink a,#boxlink a:hover {color:#aaaaaa;font-size:9px;text-decoration:none;text-align:center;padding:5px;}
#subscribe-box-blogttcn {width:600px;background-color:#55579e;}
#subscribe-box-blogttcn p {font-family:&#39;Roboto Condensed&#39;;font-size:24px;font-weight:700;color:#fff;line-height:20px;padding:15px 20px 0 20px;margin:0}
#subscribe-box-blogttcn span {color: #f4f4f4; font: 400 20px Roboto; width: 90%; padding-top: 6px; margin: auto; display: block;}
#subscribe-box-blogttcn .emailfield {padding:0px 20px 10px;}
#subscribe-box-blogttcn .emailfield input {background:rgba(0,0,0,.15);color:#fff;padding:10px;margin-top:10px;font-size:18px;font-family:&#39;Roboto&#39;,sans-serif;letter-spacing:-.7px;width:46%;border:0;transition:all 0.4s ease-in-out;}
#subscribe-box-blogttcn .emailfield input:focus {background:rgba(0,0,0,.35);outline:none;color:#fff}
#subscribe-box-blogttcn .emailfield .submitbutton {background:rgba(0,0,0,.15);color:#fff;text-transform:uppercase;font-weight:normal;font-size: 22px;border:none;outline:none;width:100%;cursor:pointer;transition:color .2s;transition:background .3s}
#subscribe-box-blogttcn .emailfield .submitbutton:active,#subscribe-box-blogttcn .emailfield .submitbutton:hover{background:#fff;color:#444!important;}
#subscribe-box-blogttcn .emailfield input::-webkit-input-placeholder{color:#f4f4f4}
#subscribe-box-blogttcn{animation:colorBackground 20s infinite;-webkit-animation:colorBackground 20s infinite;-moz-animation:colorBackground 20s infinite;-o-animation:colorBackground 20s infinite}
@keyframes colorBackground{0%{background-color:#55579e;color:#fbcf61}20%{background-color:#6bd57e;color:#6bd57e}40%{background-color:#ff6f6f;color:#ff6f6f}60%{background-color:#57cff4;color:#57cff4}80%{background-color:#0ed4c8;color:#0ed4c8}100%{background-color:#fbcf61;color:#fbcf61}}
@-webkit-keyframes colorBackground{0%{background-color:#fbcf61;color:#fbcf61}20%{background-color:#6bd57e;color:#6bd57e}40%{background-color:#ff6f6f;color:#ff6f6f}60%{background-color:#57cff4;color:#57cff4}80%{background-color:#0ed4c8;color:#0ed4c8}100%{background-color:#fbcf61;color:#fbcf61}}
@-moz-keyframes colorBackground{0%{background-color:#fbcf61;color:#fbcf61}20%{background-color:#6bd57e;color:#6bd57e}40%{background-color:#ff6f6f;color:#ff6f6f}60%{background-color:#57cff4;color:#57cff4}80%{background-color:#0ed4c8;color:#0ed4c8}100%{background-color:#fbcf61;color:#fbcf61}}
@-o-keyframes colorBackground{0%{background-color:#fbcf61;color:#fbcf61}20%{background-color:#6bd57e;color:#6bd57e}40%{background-color:#ff6f6f;color:#ff6f6f}60%{background-color:#57cff4;color:#57cff4}80%{background-color:#0ed4c8;color:#0ed4c8}100%{background-color:#fbcf61;color:#fbcf61}}
Bước 3. Chèn đoạn code sau vào trước thẻ </body> trong template.
<div id='sub-box'>
<div id='boxclose'>
</div>
<div id='boxview'>
<div id='closebox'>
</div>
<div id='subscribe-box-blogttcn'>
<center><p> ĐĂNG KÝ NHẬN TIN QUA EMAIL</p><span>Hãy nhập địa chỉ Email và bấm đăng ký, bạn sẽ nhận được các bài viết mới nhất từ Bác Sĩ Windows hoàn toàn miễn phí!!</span></center>
<div class='emailfield'>
<form action='http://feedburner.google.com/fb/a/mailverify?uri=BlogThThutCngNgh-BcSWindows' method='post' onsubmit='window.open(&apos;http://feedburner.google.com/fb/a/mailverify?uri=BlogThThutCngNgh-BcSWindows, &apos;popupwindow&apos;, &apos;scrollbars=yes,width=550,height=520&apos;);return true' target='popupwindow'>
<input name='name' onblur='if (this.value == &quot;&quot;) {this.value = &quot;Tên bạn&quot;;}' onfocus='if (this.value == &quot;Tên bạn&quot;) {this.value = &quot;&quot;;}' placeholder='Tên bạn' type='text' value='Tên bạn'/>
<input name='email' onblur='if (this.value == &quot;&quot;) {this.value = &quot;Địa chỉ Email&quot;;}' onfocus='if (this.value == &quot;Địa chỉ Email&quot;) {this.value = &quot;&quot;;}' placeholder='Địa chỉ Email' type='text' value='Địa chỉ Email'/>
<input name='uri' type='hidden' value='BlogThThutCngNgh-BcSWindows'/>
<input name='loc' type='hidden' value='en_US'/>
<input class='submitbutton' type='submit' value='Đăng ký'/>
</form></div></div></div></div>
Bước 4. Chèn đoạn script sau vào trước thẻ </head> trong template.
<script type='text/javascript'>
//<![CDATA[
jQuery.cookie=function(key,value,options){if(arguments.length>1&&String(value)!=="[object Object]"){options=jQuery.extend({},options);if(value===null||value===undefined){options.expires=-1;}
if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}
value=String(value);return(document.cookie=[encodeURIComponent(key),'=',options.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));
options=value||{};var result,decode=options.raw?function(s){return s;}:decodeURIComponent;return(result=new RegExp('(?:^|; )'+encodeURIComponent(key)+'=([^;]*)').exec(document.cookie))?decode(result[1]):null;};
//]]>
</script>
<script type='text/javascript'>
jQuery(document).ready(function($){if($.cookie(&quot;popup_facebook_box&quot;)!=&quot;yes&quot;){$(&quot;#sub-box&quot;).delay(5000).fadeIn(&quot;10000&quot;);$(&quot;#closebox, #boxclose&quot;).click(function(){$(&quot;#sub-box&quot;).stop().fadeOut(&quot;10000&quot;);});}});
</script>
Bước 5. Lưu template.
Đây là mẫu hộp đăng ký mà mình thấy ưng ý nhất. Nên áp dụng thêm một thẻ điều kiện nữa để hộp đăng ký chỉ hiển thị ở trang chủ hoặc trang bài viết,...
Nếu như có lỗi trong quá trình thực hiện thì hãy bình luận bên dưới để mình giúp đỡ nhé!

Chia sẻ bài viết liên quan 3 cột 6 bài viết tuyệt đẹp cho Blogspot

Theo yêu cầu của một bạn inbox yêu cầu mình chia sẻ tiện ích Bài viết cùng chuyên mục đang có trên Blog mình. Thì bài viết này mình sẽ chia sẻ cho các bạn mẫu bài viết cùng chuyên mục (bài viết liên quan - related post) tuyệt đẹp này. Bố cục 2 hàng, 3 cột, 6 bài viết, có responsive hiển thị tốt trên mobile.
Chia sẻ bài viết liên quan 3 cột 6 bài viết tuyệt đẹp cho Blogspot
Xem demo ngay tại blog mình luôn nhé, nếu thấy thích thì áp dụng ngay nào!

Các bước thực hiện

Bước 1: Đăng nhập Blogger ➔ Mẫu ➔ Chỉnh sửa HTML.
Bước 2: Chèn đoạn code sau vào trước thẻ </head> trong template.
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<style type='text/css'>#related-posts{float:left;width:100%;margin:0 0 10px 0;background:#fff}#related-posts a{margin:0;padding:10px 0 10px 10px;background:#fff}#related-posts a:last-child{padding:10px}#related-posts .related_img{object-fit:cover;width:234.6px;margin:0 1px!important;height:120px;border-radius:0;padding:0}#related-title{color:#666;text-align:center;padding:0;font-size:18px;font-weight:400;line-height:1.3;width:234.6px;transition:all .2s;margin-top:5px;word-wrap:break-word;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#related-posts a:hover #related-title{color:#55579e}#related-posts h5{padding:10px;background:#fff;color:#666;font:400 20px &quot;Roboto&quot;,sans-serif;margin:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s}#related-posts:hover h5{background:#55579e;color:#FFF}.related-posts-more{position:absolute;width:235px;height:120px;background:#55579e url(https://4.bp.blogspot.com/-SDiaGMyrAAM/WEF-onfl5fI/AAAAAAAABbc/2DQ3OSgdhL8JFrH5OKU8pFh9-eh6shchQCLcB/s1600/search-icon.png) no-repeat center center;background-size:30%;opacity:0;transition:.5s;transform:scaleX(0)}#related-posts a:hover .related-posts-more{opacity:.5;transform:scaleX(1)}</style>
<script type='text/javascript'>//<![CDATA[
// blogttcn.blogspot.com
var relatedTitles=new Array();var relatedTitlesNum=0;var relatedUrls=new Array();var thumburl=new Array();function related_results_labels_thumbs(json){for(var i=0;i<json.feed.entry.length;i++){var entry=json.feed.entry[i];relatedTitles[relatedTitlesNum]=entry.title.$t;try{thumburl[relatedTitlesNum]=entry.gform_foot.url}catch(error){s=entry.content.$t;a=s.indexOf("<img");b=s.indexOf("src=\"",a);c=s.indexOf("\"",b+5);d=s.substr(b+5,c-b-5);if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")){thumburl[relatedTitlesNum]=d}else thumburl[relatedTitlesNum]='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyPV9Pmzjbf2kUCn7VGJR7YvBhcI_ZrvhWnPxFOxIyc7QGXvNwhRDHPacULTMU36I0Fu8srBRRU56ZgYZ0Tgw02u24X3mZdZs6ybR6xlstGPS1zvGl6RKRNzwI8Otu1pQpb-PYIlNmyVY9/s1600/no-thumbnail.png'}if(relatedTitles[relatedTitlesNum].length>35)relatedTitles[relatedTitlesNum]=relatedTitles[relatedTitlesNum].substring(0,100)+"";for(var k=0;k<entry.link.length;k++){if(entry.link[k].rel=='alternate'){relatedUrls[relatedTitlesNum]=entry.link[k].href;relatedTitlesNum++}}}}function removeRelatedDuplicates_thumbs(){var tmp=new Array(0);var tmp2=new Array(0);var tmp3=new Array(0);for(var i=0;i<relatedUrls.length;i++){if(!contains_thumbs(tmp,relatedUrls[i])){tmp.length+=1;tmp[tmp.length-1]=relatedUrls[i];tmp2.length+=1;tmp3.length+=1;tmp2[tmp2.length-1]=relatedTitles[i];tmp3[tmp3.length-1]=thumburl[i]}}relatedTitles=tmp2;relatedUrls=tmp;thumburl=tmp3}function contains_thumbs(a,e){for(var j=0;j<a.length;j++)if(a[j]==e)return true;return false}function printRelatedLabels_thumbs(){for(var i=0;i<relatedUrls.length;i++){if((relatedUrls[i]==currentposturl)||(!(relatedTitles[i]))){relatedUrls.splice(i,1);elatedTitles.splice(i,1);thumburl.splice(i,1);i--}}var r=Math.floor((relatedTitles.length-1)*Math.random());var i=0;if(relatedTitles.length>0);document.write('<div style="clear: both;"/>');while(i<relatedTitles.length&&i<20&&i<maxresults){document.write('<a style="text-decoration:none;float:left');if(i!=0)document.write('"');else document.write('"');document.write(' title="'+relatedTitles[r]+'" href="'+relatedUrls[r]+'"><span class="related-posts-more"></span><img class="related_img" src="'+thumburl[r]+'"/><div id="related-title">'+relatedTitles[r]+'</div></a>');if(r<relatedTitles.length-1){r++}else{r=0}i++}document.write('</div>');relatedUrls.splice(0,relatedUrls.length);thumburl.splice(0,thumburl.length);relatedTitles.splice(0,relatedTitles.length)}
//]]></script>
</b:if>
Bước 3: Chèn đoạn code sau vào nơi bạn muốn hiển thị
<div id='related-posts'>
<h5><i class='fa fa-tags' style='margin:0 5px 0 0'/>BÀI VIẾT CÙNG CHUYÊN MỤC</h5>
<b:loop values='data:post.labels' var='label'>
<script expr:src='&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels_thumbs&amp;max-results=6&quot;' type='text/javascript'/></b:loop>
<script type='text/javascript'>
var currentposturl=&quot;<data:post.url/>&quot;;
var maxresults=6;
var relatedpoststitle=&quot;Bài viết cùng chuyên mục:&quot;;
removeRelatedDuplicates_thumbs();
printRelatedLabels_thumbs();
</script>
</div>
<div class='clear'/>
Bước 4: Lưu template.
Trong mẫu related post này mình có dùng Font Awesome, nếu blog bạn chưa có Font Awesome thì hãy thêm đoạn code này vào sau thẻ <head> trong template nhé.
<link href='//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' rel='stylesheet' type='text/css'/>
Đây là mẫu related post theo mình đánh giá là đẹp nhất trong các mẫu related post mình từng sử dụng, hãy để lại một comment nếu bạn thích nó nhé!

Trang trí Blog ngày tết với hiệu ứng pháo hoa tuyệt đẹp bằng Javascript

Chào các bạn, để tăng thêm không khí Tết cho Blog, hôm nay mình sẽ giới thiệu đến các bạn đoạn javascript với hiệu ứng pháo hoa bắn lên tung tóe đầy màu sắc trên màn hình. Xem demo ngay tại trang chủ nhé!!

Các bước thực hiện

Bước 1: Đăng nhập Blogger ➔ Mẫu ➔ Chỉnh sửa HTML.
Bước 2: Chèn đoạn code sau vào sau thẻ <body> trong template.
<canvas height='900' id='canvas' style='position:fixed;width:100%;pointer-events:none;z-index:9999;' width='1440'/>
<script type='text/javascript'>
//<![CDATA[
window.onload = function(){
 var canvas = document.getElementById("canvas"),
  ctx = canvas.getContext("2d"),
  cw = window.innerWidth,
  ch = window.innerHeight,
  fireworks = [],
  particles = [],
  hue = 120,
  limiterTotal = 20,
  limiterTick = 0,
  timerTotal = 30,
  randomTime = 0,
  timerTick = 0,
  mousedown = false,
  mx,
  my;
 canvas.width = cw;
 canvas.height = ch;
 //$('canvas').css("background-size":cw);
 // var snd = new Audio("http://soundjax.com/reddo/38563%5EFirework.mp3"); // buffers automatically when created
 var snd = new Audio("http://soundjax.com/reddo/51715%5Efirework.mp3");
 // now we are going to setup our function placeholders for the entire demo
 // get a random number within a range
 function random( min, max ) {
  return min + Math.random()*(max-min);
 }
 // calculate the distance between two points
 function calculateDistance( p1x, p1y, p2x, p2y ) {
  return Math.sqrt((p1x-p2x)*(p1x-p2x) + (p1y-p2y)*(p1y-p2y));
 }
 // create firework
 function Firework( sx, sy, tx, ty ) {
  //actual coordinates
  this.x = sx;
  this.y = sy;
  //starting coordinate
  this.sx = sx;
  this.sy = sy;
  //target coordinates
  this.tx = tx;
  this.ty = ty;
  this.distanceToTarget = calculateDistance(sx, sy, tx, ty);
  this.distanceTraveled = 0;
  //track past coordinates to creates a trail effect
  this.coordinates = [];
  this.coordinateCount = 2;
  while(this.coordinateCount--) {
   this.coordinates.push( [this.x, this.y ]);
  }
  this.angle = Math.atan2(ty - sy, tx - sx);
  this.speed = 1;
  this.acceleration = 1.2;
  this.brightness = random(50, 70);
  this.tragetRadius = 1;
 }
 // update firework
 Firework.prototype.update = function( index ) {
  // if(this.distanceTraveled >= this.distanceToTarget ){
   // fireworks.splice(index, 1);
  // }
  if( this.targetRadius < 8){
   this.targetRadius += 0.3;
  }else{
   this.targetRadius = 1;
  }
  this.speed *= this.acceleration;
  var vx = Math.cos(this.angle)*this.speed,
   vy = Math.sin(this.angle)*this.speed;
  this.distanceTraveled = calculateDistance(this.sx, this.sy, this.x + vx, this.y + vy);
  if(this.distanceTraveled >= this.distanceToTarget ){
   this.coordinates.pop();
   this.coordinates.unshift([this.tx, this.ty]);
   //this.x = this.tx; this.y = this.ty;
   createParticles(this.x, this.y);
   snd.play();
   this.draw();
   fireworks.splice(index, 1);
  } else {
   this.x += vx;
   this.y += vy;
  }
  this.coordinates.pop();
  this.coordinates.unshift([this.x, this.y]);
 };
 // draw firework
 Firework.prototype.draw = function() {
  ctx.beginPath();
  // move to the last tracked coordinate in the set, then draw a line to the current x and y
  ctx.moveTo( this.coordinates[ this.coordinates.length - 1][ 0 ], this.coordinates[ this.coordinates.length - 1][ 1 ] );
  ctx.lineTo( this.x, this.y );
  ctx.strokeStyle = 'hsl(' + hue + ', 100%, ' + this.brightness + '%)';
  ctx.stroke();
  // ctx.beginPath();
  // ctx.arc(this.tx, this.ty, this.targetRadius, 0, Math.PI*2);
  // ctx.stroke();
 }
 // create particle
 function Particle( x, y, type ) {
  this.x = x;
  this.y = y;
  this.type = type;
  // track the past coordinates of each particle to create a trail effect, increase the coordinate count to create more prominent trails
  this.coordinates = [];
  this.coordinateCount = 6;
  while( this.coordinateCount-- ) {
   this.coordinates.push( [ this.x, this.y ] );
  }
    // TO Be Improved //
  switch (type)
  {
   case 1: var variation = random(1, 5);
     if (variation < 2)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 15 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 4;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = random( hue - 50, hue + 50 );
      this.brightness = random( 50, 80 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.01, 0.02 );
     }else if (variation < 3)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 5 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = random( hue - 50, hue );
      this.brightness = random( 50, 80 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.03 );
     }else if (variation < 4)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 8 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = random( hue, hue + 50 );
      this.brightness = random( 50, 80 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.03 );
     }else
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 15 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = random( hue - 50, hue + 50 );
      this.brightness = random( 10, 20 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.3 );
     }
     break;
   case 2: var variation = random(1, 5);
     if (variation < 2)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 10 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 4;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = 100;
      this.brightness = random( 50, 80 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.01, 0.02 );
     }else if (variation < 3)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 21 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = 100;
      this.brightness = random( 50, 80 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.03 );
     }else if (variation < 4)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 3 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = 100;
      this.brightness = random( 50, 80 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.03 );
     }else
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 5 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the othis.hue = 100;
      this.hue = 100;
      this.brightness = random( 10, 20 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.3 );
     }
     break;
   case 3: var variation = random(1, 5);
     // var hue = 10;
     if (variation < 2)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 10, 15 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 4;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = 60;
      this.brightness = random( 10, 20 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.01, 0.02 );
     }else if (variation < 3)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 11, 15 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = 10;
      this.brightness = random( 10, 20);
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.03 );

     }else if (variation < 4)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 11, 18 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = 90;
      this.brightness = random( 10, 20 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.03 );
     }else
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 11, 15 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = 120;
      this.brightness = random( 10, 20 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.3 );
     }
     break;
   case 4: var variation = random(1, 5);
     if (variation < 2)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 10 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 4;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = 300;
      this.brightness = random( 50, 80 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.01, 0.02 );
     }else if (variation < 3)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 21 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = 300;
      this.brightness = random( 50, 80 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.03 );
     }else if (variation < 4)
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 3 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the overall hue variable
      this.hue = 300;
      this.brightness = random( 50, 80 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.03 );
     }else
     {
      // set a random angle in all possible directions, in radians
      this.angle = random( 0, Math.PI * 2 );
      this.speed = random( 1, 5 );
      // friction will slow the particle down
      this.friction = 0.95;
      // gravity will be applied and pull the particle down
      this.gravity = 3;
      // set the hue to a random number +-20 of the othis.hue = 100;
      this.hue = 100;
      this.brightness = random( 10, 20 );
      this.alpha = 1;
      // set how fast the particle fades out
      this.decay = random( 0.015, 0.3 );
     }
     break;
   default:
  }
 }
 // update particle
 Particle.prototype.update = function( index ) {
  // slow down the particle
  this.speed *= this.friction;
  // apply velocity
  this.x += Math.cos( this.angle ) * this.speed;
  this.y += Math.sin( this.angle ) * this.speed + this.gravity;
  // fade out the particle
  // this.alpha -= this.decay * this.alpha;
  this.alpha -= this.decay;
  if (this.type == 4 && this.alpha <= 0.5){
   this.brightness += 50;
   this.hue += 200;
   if (this.brightness >= 200)
    this.brightness = 0;
  }
  // remove the particle once the alpha is low enough, based on the passed in index
  if( this.alpha <= this.decay ) {
   particles.splice( index, 1 );
  }
  // remove last item in coordinates array
  this.coordinates.pop();
  // add current coordinates to the start of the array
  this.coordinates.unshift( [ this.x, this.y ] );
 }
 // draw particle
 Particle.prototype.draw = function() {
  ctx. beginPath();
  // move to the last tracked coordinates in the set, then draw a line to the current x and y
  ctx.moveTo( this.coordinates[ this.coordinates.length - 1 ][ 0 ], this.coordinates[ this.coordinates.length - 1 ][ 1 ] );
  ctx.lineTo( this.x, this.y );
  ctx.strokeStyle = 'hsla(' + this.hue + ', 100%, ' + this.brightness + '%, ' + this.alpha + ')';
  ctx.stroke();
 }
 // create particle group/explosion
 function createParticles( x, y ) {
  var particleCount = 300;
  var type = Math.floor(random(1, 5));
  while(particleCount--){
   particles.push(new Particle(x, y, type));
  }
 }
 // main demo loop
 function loop() {
  //requestAnimFrame(loop);
  hue += 0.5;
  ctx.globalCompositeOperation = "destination-out";
  ctx.fillStyle =  'rgba(0, 0, 0, 0.3)';
  ctx.fillRect(0, 0, cw, ch);
  ctx.globalCompositeOperation = "lighter";
  var i = fireworks.length;
  while(i--)
  {
   fireworks[i].draw();
   fireworks[i].update(i);
  }
  // loop over each particle, draw it, update it
  var i = particles.length;
  while( i-- ) {
   particles[ i ].draw();
   particles[ i ].update( i );
  }
  if( timerTick >= timerTotal + randomTime ){
   if (!mousedown){
    /* uniform */
    // fireworks.push( new Firework(cw/2, ch, 100, random(0, ch/2)));
    /* 0 to cw/2, more to*/
    // fireworks.push( new Firework(cw/2, ch, Math.floor(Math.sqrt(random(0, cw*cw/4))), random(0, ch/2)));
 
    var xPos = Math.pow(Math.floor((random(-Math.pow(cw/2, 1/3), Math.pow(cw/2, 1/3)))), 3);
    xPos += cw/2;
    fireworks.push( new Firework(cw/2, ch, xPos, random(0, ch/2)));
    // fireworks.push( new Firework(cw/2, ch, random(-10, 100), random(0, ch/2)));
    timerTick = 0;
    randomTime = Math.pow(random(2, 4), 2);
   }
  } else {
   timerTick++;
  }
  // limit the rate at which fireworks get launched when mouse is down
  if( limiterTick >= limiterTotal ) {
   if( mousedown ) {
    // start the firework at the bottom middle of the screen, then set the current mouse coordinates as the target
    fireworks.push( new Firework( cw / 2, ch, mx, my ) );
    limiterTick = 0;
   } else {
    limiterTick= limiterTotal;
   }
  } else {
   limiterTick++;
  }
 }
 // mouse event bindings
 // update the mouse coordinates on mousemove
 canvas.addEventListener( 'mousemove', function( e ) {
  mx = e.pageX - canvas.offsetLeft;
  my = e.pageY - canvas.offsetTop;
 });
 // toggle mousedown state and prevent canvas from being selected
 canvas.addEventListener( 'mousedown', function( e ) {
  e.preventDefault();
  mousedown = true;
 });
 canvas.addEventListener( 'mouseup', function( e ) {
  e.preventDefault();
  mousedown = false;
 });
 setInterval(loop, 25);
 // (function game(){
 //  loop();
 //  setTimeout(game, Math.floor(random(30, 30)));
 // })();
};
//]]>
</script>
Bước 3: Lưu template.
Nếu bạn muốn pháo hoa bắn lên nhiều hơn thì tủy chỉnh timerTotal, số càng nhỏ thì pháo hoa bắn lên càng nhiều.
Code VuTienAnh.Pro

Tạo menu responsive với hiệu ứng bằng CSS và jQuery tuyệt đẹp

Chào các bạn, bài viết trước mình đã chia sẻ đến các bạn Flat Mega Menu, tuy nhiên nó không có responsive. Nếu như bạn không thích menu đó thì bài viết này mình sẽ giới thiệu đến các bạn mẫu menu tuyệt đẹp sử dụng CSS và jQuery để tạo thành, có cả responsive nữa. Xem demo trước, nếu thấy ứng ý thì áp dụng ngay vào Blog nhé!!
Xem demo
Bước 1: Đăng nhập Blogger ➜ Mẫu ➜ Chỉnh sửa HTML.
Bước 2: Chèn đoạn CSS dưới đây vào trước thẻ ]]></b:skin> trong template.
nav{display:block;margin:0;background:#374147;border-bottom:4px solid #55579e}
.menu{display:block}
.menu li{display:inline-block;position:relative;z-index:100}
.menu li:first-child{margin-left:0}
.menu li a{font-weight:600;text-decoration:none;padding:20px 15px;display:block;color:#fff;transition:all 0.2s ease-in-out 0s}
.menu li a:hover,.menu li:hover>a{color:#fff;background:#55579e}
.menu ul{visibility:hidden;opacity:0;margin:0;padding:0;width:150px;position:absolute;left:0;background:#fff;z-index:99;transform:translate(0,20px);transition:all 0.2s ease-out}
.menu ul:after{bottom:100%;left:20%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:6px;margin-left:-6px}
.menu ul li{display:block;float:none;background:none;margin:0;padding:0}
.menu ul li a{font-size:12px;font-weight:normal;display:block;color:#797979;background:#fff}
.menu ul li a:hover,.menu ul li:hover>a{background:#55579e;color:#fff}
.menu li:hover>ul{visibility:visible;opacity:1;transform:translate(0,0)}
.menu ul ul{left:149px;top:0;visibility:hidden;opacity:0;transform:translate(20px,20px);transition:all 0.2s ease-out}
.menu ul ul:after{left:-6px;top:10%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(255,255,255,0);border-right-color:#fff;border-width:6px;margin-top:-6px}
.menu li>ul ul:hover{visibility:visible;opacity:1;transform:translate(0,0)}
.responsive-menu{display:none;width:100%;padding:20px 15px;background:#374147;color:#fff;text-transform:uppercase;font-weight:600}
.responsive-menu:hover{background:#374147;color:#fff;text-decoration:none}
a.homer{background:#55579e}
@media (min-width:768px) and (max-width:979px){.mainWrap{width:768px}.menu ul{top:37px}.menu li a{font-size:12px}a.homer{background:#55579e}}
@media (max-width:767px){.mainWrap{width:auto;padding:50px 20px}
.menu{display:none}
.responsive-menu{display:block;margin:0}
nav{margin:0;background:none}
.menu li{display:block;margin:0}
.menu li a{background:#fff;color:#797979}
.menu li a:hover,.menu li:hover>a{background:#55579e;color:#fff}
.menu ul{visibility:hidden;opacity:0;top:0;left:0;width:100%;transform:initial}
.menu li:hover>ul{visibility:visible;opacity:1;position:relative;transform:initial}
Bước 3: Chèn đoạn javascript dưới đây vào trước thẻ </head> trong template.
<script type="text/javascript">$(document).ready(function(){ var touch = $('#resp-menu'); var menu = $('.menu'); $(touch).on('click', function(e) { e.preventDefault(); menu.slideToggle(); }); $(window).resize(function(){ var w = $(window).width(); if(w > 767 && menu.is(':hidden')) { menu.removeAttr('style'); } }); });</script>
Bước 4: Chèn đoạn code sau đây vào nơi bạn muốn hiển thị menu (sau <body> chẳng hạn).
<nav> <a class="responsive-menu" href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ" id="resp-menu"><i class="fa fa-reorder"></i> Menu</a> <ul class="menu">
<li><a class="homer" href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ"><i class="fa fa-home"></i> HOME</a> <ul class="sub-menu">
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub-Menu 1</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub-Menu 2</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub-Menu 3</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub-Menu 4</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub-Menu 5</a></li>
</ul>
</li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ"><i class="fa fa-user"></i> ABOUT</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ"><i class="fa fa-camera"></i> PORTFOLIO</a> <ul class="sub-menu">
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub-Menu 1</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub-Menu 2</a> <ul>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 1</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 2</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 3</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 4</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 5</a></li>
</ul>
</li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub-Menu 3</a> <ul>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 1</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 2</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 3</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 4</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 5</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ"><i class="fa fa-bullhorn"></i> BLOG</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ"><i class="fa fa-tags"></i> CATEGORIES</a> <ul class="sub-menu">
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub-Menu 1</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub-Menu 2</a> <ul>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 1</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 2</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 3</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 4</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 5</a></li>
</ul>
</li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub-Menu 3</a> <ul>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 1</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 2</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 3</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 4</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ">Sub Sub-Menu 5</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ"><i class="fa fa-envelope"></i> CONTACT</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ"><i class="fa fa-sitemap"></i> SITEMAP</a></li>
<li><a href="https://blogttcn.blogspot.com/2017/01/tao-menu-responsive-voi-hieu-ung-bang-css-va-jquery-tuyet-dep.html" title="Bác Sĩ Windows - Blog Thủ Thuật Công Nghệ"><i class="fa fa-exclamation-triangle"></i> DISCLAIMER</a></li>
</ul>
</nav>
Bước 5: Lưu template.
Arlina Design

Chia sẻ thanh tìm kiếm với hiệu ứng bằng CSS và jQuery tuyệt đẹp

Chào các bạn, hôm nay mình sẽ giới thiệu đến các bạn mẫu thanh tìm kiếm được thiết kế phẳng, đẹp sử dụng CSS và jQuery để thêm hiệu ứng.
Xem demo
Thanh search này do mình chỉnh sửa lại từ template của Arlina Design, mặc định thì không được vậy đâu. Mình đã chỉnh sửa CSS, thêm jQuery để có hiệu ứng đẹp hơn đấy!

Để thực hiện các bạn thực hiện các bước sau:

Bước 1: Đăng nhập Blogger ➜ Mẫu ➜ Chỉnh sửa HTML.
Bước 2: Chèn đoạn CSS dưới đây vào trước thẻ ]]></b:skin> trong template.
.searchbutton{cursor:pointer}
.searchbutton2{background:#848889;border:none;outline:none;cursor:pointer;color:#fff;padding:15px 20px;text-transform:uppercase;font-weight:400;font-size:16px;font-family:&#39;Roboto&#39;,sans-serif;transition:.3s ease-in-out;position:relative;top:1px}
.searchbutton.active:after{color:#fff}
.search-form{display:none;position:fixed;bottom:0;background:#fff;padding:0;width:100%;z-index:99;margin:0 auto}
.searchform{margin:0 auto;text-align:center;line-height:55px}
.searchbar{background:transparent;border:none;width:1080px;padding:0 10px;font:300 38px &quot;Roboto&quot;,sans-serif;color:#666;margin:0 auto;outline:0;line-height:100px;transition:.3s ease-in-out;letter-spacing:-1.55px}
.searchbar:focus{color:#666}
.searchsubmit{background:#848889 url(https://4.bp.blogspot.com/-SDiaGMyrAAM/WEF-onfl5fI/AAAAAAAABbc/2DQ3OSgdhL8JFrH5OKU8pFh9-eh6shchQCLcB/s1600/search-icon.png) no-repeat center center;background-size:60%;border:none;outline:none;cursor:pointer;color:#fff;padding:15px 25px;text-transform:uppercase;font-weight:400;font-size:16px;font-family:&#39;Roboto&#39;,sans-serif;transition:.3s ease-in-out}
.searchsubmit:hover,.searchbutton2:hover{background-color:#55579e;color:#fff}
.searchsubmit:focus,.searchbutton2:focus{background-color:#55579e;color:#fff}
.darkshadow2{display:none;position:fixed;top:0;background:rgba(0,0,0,.5);left:0;margin:0;z-index:97;width:100%;height:100vh}
Bước 3: Chèn đoạn javascript sau vào trên thẻ </head> trong template.
<script type='text/javascript'>
//<![CDATA[
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('4s(4l(p,a,c,k,e,d){e=4l(c){4k(c<a?\'\':e(4r(c/a)))+((c=c%a)>35?4n.4q(c+29):c.4v(36))};4p(!\'\'.4m(/^/,4n)){4o(c--){d[e(c)]=k[c]||e(c)}k=[4l(e){4k d[e]}];e=4l(){4k\'\\\\w+\'};c=1};4o(c--){4p(k[c]){p=p.4m(4t 4w(\'\\\\b\'+e(c)+\'\\\\b\',\'g\'),k[c])}}4k p}(\'3p(3e(p,a,c,k,e,d){e=3e(c){3f(c<a?\\\'\\\':e(3r(c/a)))+((c=c%a)>35?3j.3n(c+29):c.3l(36))};3g(!\\\'\\\'.3i(/^/,3j)){3h(c--){d[e(c)]=k[c]||e(c)}k=[3e(e){3f d[e]}];e=3e(){3f\\\'\\\\\\\\w+\\\'};c=1};3h(c--){3g(k[c]){p=p.3i(3m 3k(\\\'\\\\\\\\b\\\'+e(c)+\\\'\\\\\\\\b\\\',\\\'g\\\'),k[c])}}3f p}(\\\'1V(1P(p,a,c,k,e,d){e=1P(c){1Q(c<a?\\\\\\\'\\\\\\\':e(2W(c/a)))+((c=c%a)>35?1R.2S(c+29):c.1Y(36))};1T(!\\\\\\\'\\\\\\\'.1S(/^/,1R)){1U(c--){d[e(c)]=k[c]||e(c)}k=[1P(e){1Q d[e]}];e=1P(){1Q\\\\\\\'\\\\\\\\\\\\\\\\w+\\\\\\\'};c=1};1U(c--){1T(k[c]){p=p.1S(1W 1X(\\\\\\\'\\\\\\\\\\\\\\\\b\\\\\\\'+e(c)+\\\\\\\'\\\\\\\\\\\\\\\\b\\\\\\\',\\\\\\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2B|2z|2A|1Y|2F|2G|2L|2M|2K|2J|2H|2I\\\\\\\'.2a(\\\\\\\'|\\\\\\\'),0,{}))\\\',3o,3E,\\\'|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||3e|3f|3j|3i|3g|3h|3p|3m|3k|3l|3o|||||||||||3q|3C|3F|3K|3G|3I|44|3H|3B|3J|45|3z|3u|3t|48|3s|3v|3A|3w|3y|3x|46|47|3D|49|4d|4c|4b|4a|4f|4e|4j|4i|4g|3Z|3P|3Q|3O|3L|3M|3S|3X|41|43|3n|40|3U|42|3r|3T|3V|3W|||||||||||3R|3N|3Y|4h\\\'.3q(\\\'|\\\'),0,{}))\',4u,4K,\'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||4l|4k|4p|4o|4m|4n|4w|4v|4t|4q|4u|4s|4x|4r|4H|59|4I|4E|50|4J|4C|58|57|53|4y|55|4z|4D|54|4A|4B|4F|56|4Z|5f|5g|5a|5c|5b|5d|5e|4X|51|4P|4O|4N|4L|4M|||||||||||4Q|4R|4W|4V|4Y|4U|4S|52|4T|4G\'.4x(\'|\'),0,{}))',62,327,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||return|function|replace|String|while|if|fromCharCode|parseInt|eval|new|62|toString|RegExp|split|fadeIn|200|form|searchbutton2|113|100|63|searchbutton|fadeOut|61|60|64|268|70|77|toggleClass|65|72|300|darkshadow2|78|75|active|71|68|67|this|76|||||||||||73|69|74|66|click|79|search'.split('|'),0,{}))
//]]>
</script>
Bước 4: Chèn đoạn Code HTML sau vào sau thẻ <body> hoặc trước thẻ </body> trong template.
<div class='darkshadow2 active'/>
<div class='search-form'>
   <form action='/search' class='searchform' method='get'>
      <input class='searchbar' id='s' name='q' onblur='if(this.value==&apos;&apos;){this.value=&apos;Nhập từ khóa tìm kiếm...&apos;;}' onfocus='if(this.value ==&apos;Nhập từ khóa tìm kiếm...&apos;) {this.value=&apos;&apos;; }' placeholder='Nhập từ khóa tìm kiếm...' type='text' value='Nhập từ khóa tìm kiếm...'/>
      <input class='searchsubmit' type='submit' value=''/>
      <a class='searchbutton2'><i class='fa fa-times'/></a>
   </form>
</div>
Bước 5: Sử dụng đoạn sau để đặt icon tìm kiếm ở nơi bạn muốn (trong thanh menu, widget sidebar chẳng hạn).
<a class='searchbutton active'><i class='fa fa-search'></li></a>

Bổ sung

Nếu trong template bạn chưa có Font Awesome thì phải thêm đoạn này sau thẻ <head> nhé.
<link href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' rel='stylesheet' type='text/css'/> 

Thủ thuật bảo vệ bản quyền template bằng Javascript cho Blogspot

Vấn đề bản quyền đang là vấn đề khá nhúc nhối trong cộng đồng Blogger/Blogspot. Việc chia sẻ template miễn phí rất phổ biến. Tuy nhiên, rất ít người tôn trọng tác giả mà giữ lại link dưới phần footer. Một số người thì xóa ngay dòng đó sau khi cài đặt template vào blogspot.
Thủ thuật bảo vệ bản quyền template bằng Javascript cho Blogspot
Vậy để bảo vệ cho dòng bản quyền dưới chân trang đó thì phải làm thế nào ? Bài viết này mình sẽ chia sẻ cho các bạn đoạn javascript bắt buộc người dùng phải giữ lại đoạn bản quyền đó. Nếu họ xóa nó đi thì blog sẽ tự động chuyển hướng về trang chủ của người đã chia sẻ template kia.

Để thực hiện các bạn làm như sau

Bước 1: Đăng nhập Blogger ➜ Mẫu ➜ Chỉnh sửa HTML.
Bước 2: Chèn đoạn javascript dưới đây vào trước thẻ </head> trong template.
<script type='text/javascript'>
      //<![CDATA[
$(document).ready(function () {
  $('#copyright-template').html('Template designed by <a href='https://blogttcn.blogspot.com' >Bác Sĩ Windows</a>');
  setInterval(function () {
      if (!$('#copyright-template:visible').length) window.location.href = 'https://blogttcn.blogspot.com'
  }, 2000)})
      //]]>
</script>
Bước 3: Chèn đoạn code sau đây vào nơi bạn muốn đặt bản quyền (thông thường ta thường đặt ở footer (phần chân trang)).
<span id='copyright-template'></span>
Bước 4: Lưu template.
Lưu ý: Bạn nên chèn thêm một đoạn javascript quan trọng khác vào chung với đoạn javascript này, rồi dùng công cụ mã hóa nó. Chứ nếu bạn chèn đơn giản như vậy vào template thì người khác sẽ xóa nó trong vòng 1 nốt nhạc.

Chia sẻ CSS Popular Posts cho Blogspot xếp theo số thứ tự tuyệt đẹp

Chào các bạn, bài viết này mình sẽ chia sẻ cho các bạn đoạn CSS giúp làm đẹp widget Popular Posts của Blogspot. Trước mỗi tiêu đề bài viết sẽ đánh dấu một số. Để rõ hơn thì xem demo ảnh bên dưới nhé!

Các bước thực hiện

Bước 1: Đăng nhập Blogger Mẫu Chỉnh sửa HTML.
Bước 2: Chèn đoạn CSS dưới đây vào trước thẻ ]]></b:skin> trong template.
#PopularPosts1 ul li:first-child:after{content:"1";color:#fff!important;background:#ff6262!important}
#PopularPosts1 ul li:first-child + li:after{content:"2";color:#fff!important;background:#55579e!important}
#PopularPosts1 ul li:first-child + li + li{background:#fff}
#PopularPosts1 ul li:first-child + li + li:after{content:"3";color:#fff!important;background:#FDB713!important}
#PopularPosts1 ul li:first-child + li + li + li:after{content:"4"}
#PopularPosts1 ul li:first-child + li + li + li + li{background:#fff}
#PopularPosts1 ul li:first-child + li + li + li + li:after{content:"5"}
#PopularPosts1 ul li:first-child + li + li + li + li + li:after{content:"6"}
#PopularPosts1 ul li:first-child + li + li + li + li + li + li{background:#fff}
#PopularPosts1 ul li:first-child + li + li + li + li + li + li:after{content:"7"}
#PopularPosts1 ul li:first-child + li + li + li + li + li + li + li:after{content:"8"}
#PopularPosts1 ul li:first-child + li + li + li + li + li + li + li + li{background:#fff}
#PopularPosts1 ul li:first-child + li + li + li + li + li + li + li + li:after{content:"9"}
#PopularPosts1 ul li:first-child + li + li + li + li + li + li + li + li + li:after{content:"10"}
#PopularPosts1 ul li:first-child:after,#PopularPosts1 ul li:first-child + li + li + li + li + li + li + li + li:after,#PopularPosts1 ul li:first-child + li + li + li + li + li + li + li + li + li:after,#PopularPosts1 ul li:first-child + li:after,#PopularPosts1 ul li:first-child + li + li:after,#PopularPosts1 ul li:first-child + li + li + li:after,#PopularPosts1 ul li:first-child + li + li + li + li + li + li:after,#PopularPosts1 ul li:first-child + li + li + li + li + li + li + li:after,#PopularPosts1 ul li:first-child + li + li + li + li:after,#PopularPosts1 ul li:first-child + li + li + li + li + li:after{position:absolute;top:3px;text-align:center;left:1px;line-height:1em;font:300 20px "Roboto",sans-serif;padding:5px 12px;border-radius:50%;color:#888}
#PopularPosts1 ul li a{display:block;margin-left:45px}
Bước 3: Vào trang Bố cục, bấm Chỉnh sửa widget Bài đăng phổ biến (Popular Posts) và cài đặt như sau: (bấm vào ảnh để xem kích thước lớn)
Bước 4: Lưu template.
Lưu ý: Phải xóa hết những CSS của #PopularPosts1 trước đó (nếu có).

Chia sẻ bộ Emoticon cho phần Nhận xét của Blogspot tuyệt đẹp

Chào các bạn, đối với nhiều bạn thường xuyên bình luận trên blog của mình thì ắt hẳn đã từng nhìn thấy và sử dụng các icon để bình luận rồi chứ!? Với yêu cầu của bạn Thịnh Nguyễn (blogspotvn.com), thì hôm nay mình viết bài này để hướng dẫn các bạn chèn bộ icon tuyệt đẹp lấy cảm hứng từ Facebook này vào Blogspot. Code do mình lấy từ blog Duy Phạm (duy-pham), icon thì mình lấy từ Facebook.
Chia sẻ bộ Emoticon cho phần Nhận xét của Blogspot tuyệt đẹp
Kéo xuống phần bình luận bên dưới để trải nghiệm ngay nhé, nếu thấy thích thì áp dụng ngay vào blog luôn cho thêm chuyên nghiệp!!
Bước 1: Đăng nhập Blogger Mẫu Chỉnh sửa HTML.
Bước 2: Chèn đoạn javascript dưới đây vào trước thẻ </body> trong template.
<script>//<![CDATA[
// Shared by Blogttcn.blogspot.com
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('2r 2x="5p & 5o 2m 5q 5t 5s 5n://5m.5h",2z=[{2h:"/2H",2d:"2i://2.2e.2a.2b/-5g/5f/5j/5l-5k-5u/2g/2j-5v-2H-2f-2a-2b.2c"},{2h:"==",2d:"2i://3.2e.2a.2b/-5E/5G/5H/5D/2g/2j-5C-2f-2a-2b.2c"},{2h:"/2w",2d:"2i://3.2e.2a.2b/-5x-0/5d/4R/4P/2g/2j-2w-2f-2a-2b.2c"},{2h:"/g",2d:"2i://3.2e.2a.2b/-4J/4I/4H/4L/2g/4M-2f-2a-2b.2c"},{2h:";)",2d:"2i://3.2e.2a.2b/-4W-58/57/5b/G-5S/2g/5R-2f-2a-2b.2c"},{2h:"^.^",2d:"2i://3.2e.2a.2b/-61/63/6e/6d-6f-6g/2g/6i-2f-2a-2b.2c"},{2h:"/f",2d:"2i://4.2e.2a.2b/-6h/6c/6b/66-4G/2g/64-2f-2a-2b.2c"},{2h:"/r",2d:"2i://2.2e.2a.2b/-67/68/6a/-69/2g/2j-6Q-4A-2f-2a-2b.2c"},{2h:"^-^",2d:"2i://3.2e.2a.2b/-3s/3r/3t/3u/2g/2j-2l-3v-2p-2f-2a-2b.2c"},{2h:"/3q",2d:"2i://2.2e.2a.2b/-3p/3k/3j/3l/2g/2j-3m-3o-2f-2a-2b.2c"},{2h:"-.-",2d:"2i://2.2e.2a.2b/-3n/3w/3x/3G/2g/2j-3F-3H-3I-2f-2a-2b.2c"},{2h:"/o",2d:"2i://3.2e.2a.2b/-3J/3E/3D/3z/2g/2j-2s-2u-3i-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\\\H\\\\q\\\\m\\\\J\\\\r\\\\u\\\\l\\\\t\\\\A\\\\p","\\\\q\\\\m\\\\J","\\\\l\\\\h\\\\B\\\\s\\\\k\\\\t\\\\h","\\\\C\\\\F","\\\\o\\\\k\\\\m\\\\M"];Q V=[];K=[];I=[];1q=a[0];1w=a[1];1u=a[2];1s=1Y[a[4]](a[3]);c=1s[a[6]](a[5]);D(c){U(x=0;x<c[a[7]];x++){Q 1i=a[8];1o=a[8];P=a[8];d=c[a[10]](x)[a[9]];e=d[a[12]](a[11]);f=d[a[12]](a[13]);g=d[a[12]](a[14]);U(Q i=1;i<e[a[7]];i++){U(Q j=0;j<Z[a[7]];j++){1h=e[i][a[16]](a[15]+Z[j]);D(1h!=-1){V[i]=a[11]+e[i][a[17]](0,1h)+a[15]+Z[j];D((V[i][a[16]](a[18])==-1)&&(V[i][a[16]](a[19])==-1)){1i+=a[20]+V[i]+a[21]}}}};U(Q i=1;i<f[a[7]];i++){1a=f[i][a[16]](a[18]);X=f[i][a[16]](a[19]);D(1a!=-1){K[i]=f[i][a[17]](0,1a);Y=K[i][a[16]](a[19]);D(Y!=-1){K[i]=K[i][a[17]](0,Y)}}S{D(X!=-1){K[i]=f[i][a[17]](0,X)}S{D(i==f[a[7]]-1){K[i]=f[i][a[17]](0,d[a[7]])}}};K[i]=K[i][a[12]](a[22]);K[i]=K[i][0];1o+=a[1x]+K[i]+a[1U]};U(Q i=1;i<g[a[7]];i++){1m=g[i][a[16]](a[18]);1n=g[i][a[16]](a[19]);D(1m!=-1){I[i]=g[i][a[17]](0,1m);1j=I[i][a[16]](a[19]);D(1j!=-1){I[i]=I[i][a[17]](0,1j)}}S{D(1n!=-1){I[i]=g[i][a[17]](0,1n)}S{D(i==g[a[7]]-1){I[i]=g[i][a[17]](0,d[a[7]])}}};1k=I[i][a[17]](0,2);I[i]=I[i][a[17]](2,I[i][a[7]]);P+=a[1V];D(1k==a[1t]){P+=a[1O]}S{P+=a[1J]};P+=a[1A];D(1k==a[1t]){P+=a[1y]}S{P+=a[1B]};P+=I[i]+a[1M]};U(Q y=0;y<1l[a[7]];y++){d=d[a[1K]](1l[y][a[1L]],a[1I]+1l[y][a[1E]]+a[21])};D(1G==1q+a[1F]+1w+a[1C]+1u){c[a[10]](x)[a[9]]=d+1i+1o+P}}};\',"|","5Q","||||||||||5P|5M||||||5N|||5O|5T|5U|5Z|60|5Y|5X|5V|5W|6j|6k|6G|6H|||6F|6E|6C|6D|2q|6I|6J|6O|6P|6N|6M|6K|6L|6B|6A|6q|6r|2r|6p|6o|6l|2m|2d|6m|6n|6s|2t|||||||||||6t|6y|6z|6x|6w|6u|6v|5L|5K|53|54|2z|52|51|4Y|4Z|50|55|56|26|5c|5a|59|23|30|4X|29|31|38|4N|35|37|2x|4K|34|28|36|33|32|4O|27|4U|4V|4T|4S|4Q|24|25|5e|5A|5B|5z|||","","5y","5w","\\\\w+","\\\\b","g"];5I(2o(a,i,o,m,e,p){2q(e=2o(a){2n(i>a?2k[4]:e(5J(a/i)))+(35<(a%=i)?2E[2k[5]](a+29):a.5F(36))},!2k[4][2k[6]](/^/,2E)){2m(;o--;)p[e(o)]=m[o]||e(o);m=[2o(a){2n p[a]}],e=2o(){2n 2k[7]},o=1}2m(;o--;)m[o]&&(a=a[2k[6]](5i(2k[8]+e(o)+2k[8],2k[9]),m[o]));2n a}(2k[0],62,5r,2k[3][2k[2]](2k[1]),0,{}));',62,425,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||blogspot|com|png|img|bp|blogttcn|s1600|text|https|icon|dp|cuoi|for|return|function|mat|if|var|ngac|type_img|nhien|_|ok|copyright|man|smileys|pac|WHTnevhjp6I|ZXiklf3RP7Y|AAAAAAAACUE|String|S01kdBs6kbGFatECgCLcB|8FdQ2hGAVMMvwfw|hi|AAAAAAAACTk|WHTndYMzY2I|8FX8pJHdfaUAKpxlk5dQmTnJnohuf3VDQCLcB|khoc|mot|DW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ws5EI|EUhUYSgrE_gFbrM8_wkWVbBphvc0FWo|AAAAAAAACUI|ra|e_7pfCMcXQCLcB|9a8JIJ1Rw|WHTndg61xpI|PdYIkQ1TlTQ|AAAAAAAACTo|7HvIzDRxmWwizkw4XNXHziYmUei9dJc6ACLcB|khong|trai|co|ngang|WHTncBwOW0I|AAAAAAAACTI|Azfkbn34DOgQeJV6CfYNpxY76ViE4T2VACLcB|mac|WHTnc_21m3I|Hhgu4roACLcB|AAAAAAAACWQ|WHzb9U28KLI|zVDDwHkIJ4E|x43|3G2Qunlbza8aNHpwjZM0rScW1YxFEwZwgCLcB|4emoticon|x6B|x71|4zxoidiXZQQDxU22B2DFnn97GsBCDlN5wCLcB|x4C|AAAAAAAACUA|x31|x25|x3B|x32|Atbet|x49|a2|x34|cbef|aft_nct2|aft_nct1|aft_nct3|m_l|x26|cL|WHzb9a62gsI|GzQXs|cbef2|x42|AAAAAAAACWI|cbef3|WHTnevNlwQI|x4E|WHTndFOTkfI|LuPjeIPajCI|info|RegExp|AAAAAAAACTg|gheeiR4AIAX3UI3vGTsVaK9dKu|Yum|duypham|http|Multimedia|Emoticons|Thread|127|by|Comment|jACLcB|hello|replace|RLbdmcajB|fromCharCode|x4F|x48|document|angry|rptz1JXzcU4k5wtDUflKXigB15OP949awCLcB|z89lvV3G1wM|toString|WHTnbg4LfjI|AAAAAAAACS4|eval|parseInt|a1|dot_png|x74|x65|x61|_0xf28e|split|3emoticon|J67WEx4WkgL0nsKfSCr97R0ZrwTUNVQCLcB|x72|x6D|x20|x6C|x69|x22|x2F|x68|N52zwdjsG3g||WHzb9wgsbzI|2emoticon|like|ihDBd07fNssoNpeJQBaIXw9X|130QOfdenN4|WHTndoBraQI|4i9OFkFfz8kGKuY9qlMPjpyWhuY8_TFgCLcB|AAAAAAAACTs|AAAAAAAACWM|WHzb9U_G5cI|yZT_cjOtYT4Po5|AAAAAAAACWU|1LRJVlzz31xpb|7jDwCLcB|hmjAxdkivPQ|emoticon|x63|x73|x78|x2D|aft_y2|else|x3A|x66|a3|aft_y3|aft_y1|x33|x76|x54|x3F|x45|x4D|x79|x2E|x70|x64|x3D|x6E|x77|x6F|x62|x75|youtube|x3E|x67|nct|x30|x3C|liec'.split('|'),0,{}))
//]]> </script>
Bước 3: Chèn đoạn sau vào nơi bạn muốn hiển thị khung emoticon. Có thể chèn trước đoạn <div class='comments-content'>
<div class='comment_emo_list'>
<div class='item'><img class='comment_emo' src='https://1.bp.blogspot.com/-1oM_TE5VfbU/WHTncvNBORI/AAAAAAAACTQ/9rRLfcfYKlYW5M7ZHIlkeij9VHPMTUqtQCLcB/s1600/icon-cuoi-mim-blogttcn-blogspot-com.png' /><span> :)</span>
</div>
<div class='item'><img class='comment_emo' src='https://4.bp.blogspot.com/-MvpmHqY81vg/WHTncOUc90I/AAAAAAAACTM/CbeflLmiwswbStXvdskh9GM8BKYHAPYIgCLcB/s1600/icon-cuoi-lon-blogttcn-blogspot-com.png' /><span> :))</span>
</div>
<div class='item'><img class='comment_emo' src='https://2.bp.blogspot.com/-PVBIliYz67o/WHTncp4PXfI/AAAAAAAACTU/-Mp4Tf2HrHAJ0h8WcNVmJnBuvHdRbXxKQCLcB/s1600/icon-cuoi-nhe-rang-blogttcn-blogspot-com.png' /><span> :D</span>
</div>
<div class='item'><img class='comment_emo' src='https://1.bp.blogspot.com/-Cec2pPubVOc/WHTnc_21m3I/AAAAAAAACTY/EUhUYSgrE_gFbrM8_wkWVbBphvc0FWo-wCLcB/s1600/icon-cuoi-ra-nuoc-mat-blogttcn-blogspot-com.png' /><span> =))</span>
</div>
<div class='item'><img class='comment_emo' src='https://3.bp.blogspot.com/-r7szGiJPRW4/WHTnbloHYEI/AAAAAAAACS8/JHTPfRRTac04Y1Im8nJK3wUZdcWHNLR6gCLcB/s1600/icon-buon-blogttcn-blogspot-com.png' /><span> :(</span>
</div>
<div class='item'><img class='comment_emo' src='https://2.bp.blogspot.com/-DWDSdGErhuw/WHTndYMzY2I/AAAAAAAACTk/8FX8pJHdfaUAKpxlk5dQmTnJnohuf3VDQCLcB/s1600/icon-khoc-mot-dong-song-blogttcn-blogspot-com.png' /><span> :((</span>
</div>
<div class='item'><img class='comment_emo' src='https://3.bp.blogspot.com/-uNPH8DfKccM/WHTnd6kNQsI/AAAAAAAACT0/5AHLbo1rVVUsx7-wF5Q9svhOMTeTzSNTgCLcB/s1600/icon-ngac-nhien-blogttcn-blogspot-com.png' /><span> :o</span>
</div>
<div class='item'><img class='comment_emo' src='https://1.bp.blogspot.com/-N-9a8JIJ1Rw/WHTncBwOW0I/AAAAAAAACTI/Azfkbn34DOgQeJV6CfYNpxY76ViE4T2VACLcB/s1600/icon-cuoi-mac-co-blogttcn-blogspot-com.png' /><span> ^_^</span>
</div>
<div class='item'><img class='comment_emo' src='https://3.bp.blogspot.com/-s8ctkdgok3E/WHTndHQYshI/AAAAAAAACTc/X_zzwmr8HYscUN1kAr8w6nn3DRZrbgy8gCLcB/s1600/icon-cuoi-tit-mat-blogttcn-blogspot-com.png' /><span> ^-^</span>
</div>
<div class='item'><img class='comment_emo' src='https://4.bp.blogspot.com/-hmjAxdkivPQ/WHzb9U_G5cI/AAAAAAAACWM/ihDBd07fNssoNpeJQBaIXw9X-Hhgu4roACLcB/s1600/2emoticon-blogttcn-blogspot-com.png' /><span>/f</span>
</div>
<div class='item'><img class='comment_emo' src='https://3.bp.blogspot.com/-N52zwdjsG3g/WHzb9wgsbzI/AAAAAAAACWU/yZT_cjOtYT4Po5-1LRJVlzz31xpb-7jDwCLcB/s1600/emoticon-blogttcn-blogspot-com.png' /><span>^.^</span>
</div>
<div class='item'><img class='comment_emo' src='https://3.bp.blogspot.com/-zVDDwHkIJ4E/WHzb9U28KLI/AAAAAAAACWQ/3G2Qunlbza8aNHpwjZM0rScW1YxFEwZwgCLcB/s1600/4emoticon-blogttcn-blogspot-com.png' /><span>/g</span>
</div>
<div class='item'><img class='comment_emo' src='https://3.bp.blogspot.com/-Atbet-GzQXs/WHzb9a62gsI/AAAAAAAACWI/G-J67WEx4WkgL0nsKfSCr97R0ZrwTUNVQCLcB/s1600/3emoticon-blogttcn-blogspot-com.png' /><span>;)</span>
</div>
<div class='item'><img class='comment_emo' src='https://2.bp.blogspot.com/-PdYIkQ1TlTQ/WHTndg61xpI/AAAAAAAACTo/7HvIzDRxmWwizkw4XNXHziYmUei9dJc6ACLcB/s1600/icon-khong-hai-long-blogttcn-blogspot-com.png' /><span> -_-</span>
</div>
<div class='item'><img class='comment_emo' src='https://3.bp.blogspot.com/-z89lvV3G1wM/WHTnbg4LfjI/AAAAAAAACS4/rptz1JXzcU4k5wtDUflKXigB15OP949awCLcB/s1600/icon-angry-blogttcn-blogspot-com.png' /><span> ==</span>
</div>
<div class='item'><img class='comment_emo' src='https://2.bp.blogspot.com/-130QOfdenN4/WHTndoBraQI/AAAAAAAACTs/-4i9OFkFfz8kGKuY9qlMPjpyWhuY8_TFgCLcB/s1600/icon-liec-ngang-blogttcn-blogspot-com.png' /><span> /r</span>
</div>
<div class='item'><img class='comment_emo' src='//facebook.com/images/emoji.php/v6/zaa/1/32/1f613.png' /><span> -.-</span>
</div>
<div class='item'><img class='comment_emo' src='https://3.bp.blogspot.com/-2rfPgFZUQ1c/WHTncESnKGI/AAAAAAAACTE/RlJsk8ua-FMy2HYLOWfIqpZACdMag3u5QCLcB/s1600/icon-cuoi-le-luoi-blogttcn-blogspot-com.png' /><span> :p</span>
</div>
<div class='item'><img class='comment_emo' src='https://3.bp.blogspot.com/-dLQZY9F2Rgw/WHTneZRbRdI/AAAAAAAACT8/SqdfwoADabMT44EQ99Ae4oKJIE09uSMbwCLcB/s1600/icon-ngac-nhien-hoang-mang-blogttcn-blogspot-com.png' /><span> /o</span>
</div>
<div class='item'><img class='comment_emo' src='https://2.bp.blogspot.com/-LuPjeIPajCI/WHTndFOTkfI/AAAAAAAACTg/Yum-gheeiR4AIAX3UI3vGTsVaK9dKu-jACLcB/s1600/icon-hello-hi-blogttcn-blogspot-com.png' /><span> /hi</span>
</div>
<div class='item'><img class='comment_emo' src='https://3.bp.blogspot.com/-RLbdmcajB-0/WHTnevNlwQI/AAAAAAAACUA/4zxoidiXZQQDxU22B2DFnn97GsBCDlN5wCLcB/s1600/icon-ok-blogttcn-blogspot-com.png' /><span> /ok</span>
</div>
<div class='item'><img class='comment_emo' src='https://2.bp.blogspot.com/-qVt33tDzEjk/WHTnfKGkEnI/AAAAAAAACUM/tlmiSemEFx0BpKmdeaUrVEy9iw7bodp7ACLcB/s1600/icon-vo-tay-blogttcn-blogspot-com.png' /><span> /clap</span>
</div>
<div class='item'><img class='comment_emo' src='https://3.bp.blogspot.com/-2iyJ877TTfw/WHTnd4eTHJI/AAAAAAAACTw/zo-2Qam5gd4M6CwtW06xkTjHyQvUNElYgCLcB/s1600/icon-like-blogttcn-blogspot-com.png' /><span> (y)</span>
</div>
<div class='item'><img class='comment_emo' src='https://2.bp.blogspot.com/-UzK_X8UMjRk/WHTne6ws5EI/AAAAAAAACUI/NCQDl_nuhuArNjkhzMul1G-e_7pfCMcXQCLcB/s1600/icon-trai-tim-blogttcn-blogspot-com.png' /><span> (3)</span>
</div>

</div>
<style>.comment_emo_list{padding:10px 15px;clear:both;float:left}.comment_emo_list .item{float:left;text-align:center;height:40px;width:60px;margin:0;padding:10px 0 15px;transition:.33s;border-radius:50px}.comment_emo_list .item:hover{background:#eee}.comment_emo_list .item:hover span{color:#55579e}.comment_emo_list span{display:block;font-weight:500;font-size:14px;letter-spacing:0;color:#c7c7c7;transition:.33s}img.comment_emo{width:25px;height:25px;pointer-events:none;-webkit-user-select:none}</style>
    <!-- // emoticon by blogttcn.blogspot.com // -->
Bước 4: Lưu template.
Áp dụng ngay nào các bạn, quá đẹp luôn đúng không!?
Cảm ơn bác Duy Phạm (duy-pham) đã hỗ trợ code.