Hình ảnh minh họa
» Bắt đầu thủ thuật
1. Đăng nhập vào tài khoản Blogger
2. Vào phần thiết kế (Design)
3. Chọn chỉnh sửa HTML (Edit HTML)
4. Chèn tiếp code CSS bên dưới vào trước thẻ ]]></b:skin>
.jCarouselLite {float: left;
position: relative;
left: -5000px;
}
.carousel{margin-left:15px;}
.carousel a.prev{
float: left;
width: 18px;
height: 80px;
margin-right:4px;
background: url(https://lh4.googleusercontent.com/-HIBCv5Jv5Qk/Tkd46mA67MI/AAAAAAAAAjw/opmR5hyGa0I/left_gray.png) left 40px no-repeat;
}
.carousel a.next {
float: left;
margin-left:-3px;
width: 18px;
height: 80px;
background: url(https://lh3.googleusercontent.com/-JElA1yXJXVg/Tkd47wJMlqI/AAAAAAAAAkQ/-odO2r0zho4/right_gray.png) right 40px no-repeat;
}
#bigPic{
width:912px;
height:291px;
padding:1px;
border:1px solid #CCC;
background-color:#FFF;
margin-bottom:10px;
}
#bigPic img{
position:absolute;
display:none;
}
ul#thumbs li{
margin:0px;
padding:0;
list-style:none;
}
ul#thumbs li{
float:left;
margin-right:7px;
margin-bottom:5px;
border:1px solid #CCC;
padding:3px;
cursor:pointer;
}
ul#thumbs img{
float:left;
width:80px;
height:80px;
line-height:80px;
overflow:hidden;
position:relative;
z-index:1;
}
position: relative;
left: -5000px;
}
.carousel{margin-left:15px;}
.carousel a.prev{
float: left;
width: 18px;
height: 80px;
margin-right:4px;
background: url(https://lh4.googleusercontent.com/-HIBCv5Jv5Qk/Tkd46mA67MI/AAAAAAAAAjw/opmR5hyGa0I/left_gray.png) left 40px no-repeat;
}
.carousel a.next {
float: left;
margin-left:-3px;
width: 18px;
height: 80px;
background: url(https://lh3.googleusercontent.com/-JElA1yXJXVg/Tkd47wJMlqI/AAAAAAAAAkQ/-odO2r0zho4/right_gray.png) right 40px no-repeat;
}
#bigPic{
width:912px;
height:291px;
padding:1px;
border:1px solid #CCC;
background-color:#FFF;
margin-bottom:10px;
}
#bigPic img{
position:absolute;
display:none;
}
ul#thumbs li{
margin:0px;
padding:0;
list-style:none;
}
ul#thumbs li{
float:left;
margin-right:7px;
margin-bottom:5px;
border:1px solid #CCC;
padding:3px;
cursor:pointer;
}
ul#thumbs img{
float:left;
width:80px;
height:80px;
line-height:80px;
overflow:hidden;
position:relative;
z-index:1;
}
5. Chèn tiếp code bên dưới vào trước thẻ </body>
<script type="text/javascript" src="http://traidatmui-tips.googlecode.com/files/jquery.min.v1.4.1.js"></script>
<script src="http://traidatmui-tips.googlecode.com/files/JQuery.eva1.2.3.js" type="text/javascript"></script>
<script type="text/javascript" src="http://traidatmui-tips.googlecode.com/files/jquery.easing.1.1.js"></script>
<script type="text/javascript" src="http://traidatmui-tips.googlecode.com/files/JQ.jCarouselLite.js"></script>
<script type="text/javascript">
$(function() {
$(".jCarouselLite").jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed: 500,
auto:false, // Nếu bạn muốn ảnh tự động cuộn ngang thì thay false thành true
visible:9, // Số ảnh thumb hiển thị
scroll:5, // Số ảnh thumb một lần scroll
easing: "easeinout"
}); });
var currentImage;
var currentIndex = -1;
var interval;
/* <![CDATA[ */ function showImage(index){
if(index < $('#bigPic img').length){
var indexImage = $('#bigPic img')[index]
if(currentImage){
if(currentImage != indexImage ){
$(currentImage).css('z-index',2);
clearTimeout(myTimer);
$(currentImage).fadeOut(250, function() {
myTimer = setTimeout("showNext()", 3000);
$(this).css({'display':'none','z-index':1})
});
}
}
$(indexImage).css({'display':'block', 'opacity':1});
currentImage = indexImage;
currentIndex = index;
$('#thumbs li').removeClass('active');
$($('#thumbs li')[index]).addClass('active');
}
}
function showNext(){
var len = $('#bigPic img').length;
var next = currentIndex < (len-1) ? currentIndex + 1 : 0;
showImage(next);
}
var myTimer;
$(document).ready(function() {
myTimer = setTimeout("showNext()", 3000);
showNext(); //loads first image
$('#thumbs li').bind('click',function(e){
var count = $(this).attr('rel');
showImage(parseInt(count)-1);
});
});
/* ]]> */
</script>
<script src="http://traidatmui-tips.googlecode.com/files/JQuery.eva1.2.3.js" type="text/javascript"></script>
<script type="text/javascript" src="http://traidatmui-tips.googlecode.com/files/jquery.easing.1.1.js"></script>
<script type="text/javascript" src="http://traidatmui-tips.googlecode.com/files/JQ.jCarouselLite.js"></script>
<script type="text/javascript">
$(function() {
$(".jCarouselLite").jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed: 500,
auto:false, // Nếu bạn muốn ảnh tự động cuộn ngang thì thay false thành true
visible:9, // Số ảnh thumb hiển thị
scroll:5, // Số ảnh thumb một lần scroll
easing: "easeinout"
}); });
var currentImage;
var currentIndex = -1;
var interval;
/* <![CDATA[ */ function showImage(index){
if(index < $('#bigPic img').length){
var indexImage = $('#bigPic img')[index]
if(currentImage){
if(currentImage != indexImage ){
$(currentImage).css('z-index',2);
clearTimeout(myTimer);
$(currentImage).fadeOut(250, function() {
myTimer = setTimeout("showNext()", 3000);
$(this).css({'display':'none','z-index':1})
});
}
}
$(indexImage).css({'display':'block', 'opacity':1});
currentImage = indexImage;
currentIndex = index;
$('#thumbs li').removeClass('active');
$($('#thumbs li')[index]).addClass('active');
}
}
function showNext(){
var len = $('#bigPic img').length;
var next = currentIndex < (len-1) ? currentIndex + 1 : 0;
showImage(next);
}
var myTimer;
$(document).ready(function() {
myTimer = setTimeout("showNext()", 3000);
showNext(); //loads first image
$('#thumbs li').bind('click',function(e){
var count = $(this).attr('rel');
showImage(parseInt(count)-1);
});
});
/* ]]> */
</script>
6. Save template lại và trở về phần tử trang (Page Elements)
7. Thêm 1 HTML/Javascript và thêm vào code bên dưới
<div id="bigPic">
<img src="https://lh4.googleusercontent.com/-dwmwhehAUus/TmiK_o5JrUI/AAAAAAAAA0w/5t63K4Wfv3Q/s912/1.jpg" alt="" />
<img src="https://lh4.googleusercontent.com/-6G-Uy5zwOkA/TmiK_KUXnwI/AAAAAAAAA0w/jrewNz2w18I/s912/2.jpg" alt="" />
<img src="https://lh3.googleusercontent.com/-QIc5AWfFPXw/TmiLAeQ9JiI/AAAAAAAAA0w/-W_i8gN9a3Y/s912/3.jpg" alt="" />
<img src="https://lh3.googleusercontent.com/--f0b6s_10GA/TmiLA0KHkwI/AAAAAAAAA0w/CARgfzLwv1g/s912/4.jpg" alt="" />
<img src="https://lh3.googleusercontent.com/-lsE0o-UnRyk/TmiLB2VzNAI/AAAAAAAAA0w/GgHcVhyS1Yw/s912/5.jpg" alt="" />
<img src="https://lh6.googleusercontent.com/-VxkFF-kfBjo/TmiLC-6WrXI/AAAAAAAAA0w/lkENC-50Ibk/s912/6.jpg" alt="" />
<img src="https://lh5.googleusercontent.com/-iZvMTMEbW7E/TmiLDeiXLVI/AAAAAAAAA0w/cvuB0AMWuJo/s912/7.jpg" alt="" />
<img src="https://lh4.googleusercontent.com/-m8HPWXlAjvQ/TmiLDxdM9RI/AAAAAAAAA0w/-3RpxC5DwrE/s912/8.jpg" alt="" />
<img src="https://lh6.googleusercontent.com/-yVAWgB-YBXA/TmiLE4ZmWXI/AAAAAAAAA0w/vxYpgZBfH84/s912/9.jpg" alt="" />
<img src="https://lh5.googleusercontent.com/-4SrBnHMQEHs/TmiLFVjLjSI/AAAAAAAAA0w/ZB20w8TMSkI/s912/10.jpg" alt="" />
</div>
<div class="carousel">
<a href="#" class="prev"></a>
<div class="jCarouselLite">
<ul id="thumbs">
<li class='active' rel='1'><img src="https://lh4.googleusercontent.com/-YnQYffIicLI/TmiK_cZiFCI/AAAAAAAAA0w/p8m-Q1xEnFs/1_thumb.jpg" alt="" /></li>
<li rel='2'><img src="https://lh3.googleusercontent.com/-t5VT9yFpBWM/TmiLA-VXkEI/AAAAAAAAA0w/2bNFaiZsxAs/3_thumb.jpg" alt="" /></li>
<li rel='3'><img src="https://lh5.googleusercontent.com/-DeiS8s4fL6Q/TmiLBHugMSI/AAAAAAAAA0w/zUBeZAEZtxg/4_thumb.jpg" alt="" /></li>
<li rel='4'><img src="https://lh3.googleusercontent.com/-9VoOlMJ62QQ/TmiLBCIuKyI/AAAAAAAAA0w/n10BL_FWDPI/5_thumb.jpg" alt="" /></li>
<li rel='5'><img src="https://lh3.googleusercontent.com/-Q3B9WuIUkEQ/TmiLCtqU6xI/AAAAAAAAA0w/gpi9YnHLTyU/6_thumb.jpg" alt="" /></li>
<li rel='6'><img src="https://lh3.googleusercontent.com/-6xG5Bwiw9Mg/TmiLDT9NfMI/AAAAAAAAA0w/lsLrZh-XjLs/7_thumb.jpg" alt="" /></li>
<li rel='7'><img src="https://lh6.googleusercontent.com/-k5AWRRawSsw/TmiLEG0Z4kI/AAAAAAAAA0w/wdi084w_vtc/8_thumb.jpg" alt="" /></li>
<li rel='8'><img src="https://lh4.googleusercontent.com/-fX8xfvkVe8k/TmiLFIqXf5I/AAAAAAAAA0w/iHI8fxafWBA/9_thumb.jpg" alt="" /></li>
<li rel='9'><img src="https://lh6.googleusercontent.com/-mhr_1-yOxAs/TmiLFj_HdSI/AAAAAAAAA0w/2YdGR8gG8yw/10_thumb.jpg" alt="" /></li>
<li rel='10'><img src="https://lh6.googleusercontent.com/-vMhGOLkEyiU/TmiK_2dSVVI/AAAAAAAAA0w/_xx716b7dR0/2_thumb.jpg" alt="" /></li>
</ul>
</div>
<a href="#" class="next"></a>
</div><div style="clear:both;"/>
<img src="https://lh4.googleusercontent.com/-dwmwhehAUus/TmiK_o5JrUI/AAAAAAAAA0w/5t63K4Wfv3Q/s912/1.jpg" alt="" />
<img src="https://lh4.googleusercontent.com/-6G-Uy5zwOkA/TmiK_KUXnwI/AAAAAAAAA0w/jrewNz2w18I/s912/2.jpg" alt="" />
<img src="https://lh3.googleusercontent.com/-QIc5AWfFPXw/TmiLAeQ9JiI/AAAAAAAAA0w/-W_i8gN9a3Y/s912/3.jpg" alt="" />
<img src="https://lh3.googleusercontent.com/--f0b6s_10GA/TmiLA0KHkwI/AAAAAAAAA0w/CARgfzLwv1g/s912/4.jpg" alt="" />
<img src="https://lh3.googleusercontent.com/-lsE0o-UnRyk/TmiLB2VzNAI/AAAAAAAAA0w/GgHcVhyS1Yw/s912/5.jpg" alt="" />
<img src="https://lh6.googleusercontent.com/-VxkFF-kfBjo/TmiLC-6WrXI/AAAAAAAAA0w/lkENC-50Ibk/s912/6.jpg" alt="" />
<img src="https://lh5.googleusercontent.com/-iZvMTMEbW7E/TmiLDeiXLVI/AAAAAAAAA0w/cvuB0AMWuJo/s912/7.jpg" alt="" />
<img src="https://lh4.googleusercontent.com/-m8HPWXlAjvQ/TmiLDxdM9RI/AAAAAAAAA0w/-3RpxC5DwrE/s912/8.jpg" alt="" />
<img src="https://lh6.googleusercontent.com/-yVAWgB-YBXA/TmiLE4ZmWXI/AAAAAAAAA0w/vxYpgZBfH84/s912/9.jpg" alt="" />
<img src="https://lh5.googleusercontent.com/-4SrBnHMQEHs/TmiLFVjLjSI/AAAAAAAAA0w/ZB20w8TMSkI/s912/10.jpg" alt="" />
</div>
<div class="carousel">
<a href="#" class="prev"></a>
<div class="jCarouselLite">
<ul id="thumbs">
<li class='active' rel='1'><img src="https://lh4.googleusercontent.com/-YnQYffIicLI/TmiK_cZiFCI/AAAAAAAAA0w/p8m-Q1xEnFs/1_thumb.jpg" alt="" /></li>
<li rel='2'><img src="https://lh3.googleusercontent.com/-t5VT9yFpBWM/TmiLA-VXkEI/AAAAAAAAA0w/2bNFaiZsxAs/3_thumb.jpg" alt="" /></li>
<li rel='3'><img src="https://lh5.googleusercontent.com/-DeiS8s4fL6Q/TmiLBHugMSI/AAAAAAAAA0w/zUBeZAEZtxg/4_thumb.jpg" alt="" /></li>
<li rel='4'><img src="https://lh3.googleusercontent.com/-9VoOlMJ62QQ/TmiLBCIuKyI/AAAAAAAAA0w/n10BL_FWDPI/5_thumb.jpg" alt="" /></li>
<li rel='5'><img src="https://lh3.googleusercontent.com/-Q3B9WuIUkEQ/TmiLCtqU6xI/AAAAAAAAA0w/gpi9YnHLTyU/6_thumb.jpg" alt="" /></li>
<li rel='6'><img src="https://lh3.googleusercontent.com/-6xG5Bwiw9Mg/TmiLDT9NfMI/AAAAAAAAA0w/lsLrZh-XjLs/7_thumb.jpg" alt="" /></li>
<li rel='7'><img src="https://lh6.googleusercontent.com/-k5AWRRawSsw/TmiLEG0Z4kI/AAAAAAAAA0w/wdi084w_vtc/8_thumb.jpg" alt="" /></li>
<li rel='8'><img src="https://lh4.googleusercontent.com/-fX8xfvkVe8k/TmiLFIqXf5I/AAAAAAAAA0w/iHI8fxafWBA/9_thumb.jpg" alt="" /></li>
<li rel='9'><img src="https://lh6.googleusercontent.com/-mhr_1-yOxAs/TmiLFj_HdSI/AAAAAAAAA0w/2YdGR8gG8yw/10_thumb.jpg" alt="" /></li>
<li rel='10'><img src="https://lh6.googleusercontent.com/-vMhGOLkEyiU/TmiK_2dSVVI/AAAAAAAAA0w/_xx716b7dR0/2_thumb.jpg" alt="" /></li>
</ul>
</div>
<a href="#" class="next"></a>
</div><div style="clear:both;"/>
Các ảnh bên dưới phần bigPic bạn thay thành các link ảnh lớn tương ứng với các ảnh thumbnail trong phần thumbs. Như vậy là xong.
8. Cuối cùng save tiện ích lại
0 nhận xét