Để thêm tiện ích này bạn hãy làm theo hướng dẫn sau nha
- Vào blogger > Mẫu > Chỉnh sửa HTML
- Chọn mở rộng mẫu Tiện ích
- Dán đoạn code bên dưới trước thẻ </head>
<!-- Start Text re size gadget-->
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js' type='text/javascript'/>
<script>
$(document).ready(function(){
//ID, class and tag element that font size is adjustable in this array
//Put in html or body if you want the font of the entire page adjustable
var section = new Array('span','.section2');
section = section.join(',');
// Reset Font Size
var originalFontSize = $(section).css('font-size');
$(".resetFont").click(function(){
$(section).css('font-size', originalFontSize);
});
// Increase Font Size
$(".increaseFont").click(function(){
var currentFontSize = $(section).css('font-size');
var currentFontSizeNum = parseFloat(currentFontSize, 10);
var newFontSize = currentFontSizeNum*1.2;
$(section).css('font-size', newFontSize);
return false;
});
// Decrease Font Size
$(".decreaseFont").click(function(){
var currentFontSize = $(section).css('font-size');
var currentFontSizeNum = parseFloat(currentFontSize, 10);
var newFontSize = currentFontSizeNum*0.8;
$(section).css('font-size', newFontSize);
return false;
});
});
</script>
<!-- End Text re size gadget -->
- Tìm đoạn
<div class='post-header-line-1'/>
- Và dán sau nó đoạn code bên dưới
<!-- Start Text re size gadget -->
<b:if cond='data:blog.pageType == "item"'>
<table border='0' style='float:right; margin-left:5px;'><tr><td><img border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTxsnn4Hx4zKBkvJT5yIHZf6Jv7g1x_YRMoD8IEVWf2yUAnbnzyD5a4MKDwQnpYmvcxOKhd9O_KR-zFi2mX1_iURZRoolKs6IqmV1KCKH7yjpMvjccQUhPTOyRfrpF3wQ1NTQP4M5qq1GU/h120/font-size-blogger-gadget.png'/> | <a class='increaseFont' style='cursor: pointer; cursor: hand;' title='Larger Text'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf7HH5Sha1dYID2s2kbdMhX6CTySGzcsQ8wCGkCmkWKEMsVc4exb-iGsg4EpIUFAY3ZWZxXSglBWkPvhZQqMm-lWVZZVZR_YJws64TMvybIDSe7PqVSy1Zplcc3SRpA3YtMFxboa9XlgSq/h120/bigger-font+-+Copy.png'/></a>
<a class='decreaseFont' style='cursor: pointer; cursor: hand;' title='Smaller Text'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMWXqQ1ofERXp0oDzGUWcSkHh6EYE80xm1n2CgoHeh2ScpAhAcrl8tdyPHfHEiKNZpuJfDCKGPnF1xbUsKfKCIzWJTIll4oCLTbB56u39Y1SzC_JWISV73niudn-bUtzzEVU607MxaIBDL/h120/smaller-font.png' style='cursor: hand;'/></a>
<a class='resetFont' style='cursor: pointer; cursor: hand;' title='Reset Text Size'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF-61rExa5KSMHl-w8DbkGbuj058Xp06C1LxHTmrwzITEpMaYeH1h5CmpJtUJNlK8mNGsuTX1yRp8y0EdeU75sANaURVQi42V6DjZDsWDiYfAKBK_7IO-Q-rVuAhnoSPho0u_SWb3DRVZo/h120/reset-font.png' style='cursor: hand;'/></a></td></tr></table>
</b:if>
<!-- End Text re size gadget -->
- Tìm code sau
<data:post.body/>
- Thay thế tất cả đoạn <data:post.body/> bằng code bên dưới
<span><data:post.body/></span>
- Lưu lại và vào một bài đăng nào đó để xem kết quả nào!

0 nhận xét:
Đăng nhận xét