Thêm Slide vào Blogger

Slides là một Plugin xem hình tự động sử dụng jQuery cho phép Bạn tạo các Feature Post mà bạn tâm đắc nhằm thu hút lượng visitor đến với blog bạn nhiều hơn và nó còn giúp Blog của bạn trở nên chuyên nghiệp hơn, và chắc các bạn không còn xa lạ với những Plugin này, hôm này mình mạn phép hướng dẫn các bạn sử dụng loại Plugin này ^^!. Trình của mình còn non, chẳng qua thấy vui post bài thôi, nếu có lỡ múa rừu qua bác nào, em xin mấy bác đừng chém hay ném gạch, tội em nha.
 Để thấy rõ hiệu quả của nó, bạn có thêm xem qua demo (Đây là demo của trang chủ Plugin này, bạn có thể Download Plugin tại trang chủ này).



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

1. Đăng nhập Blogger > Thiết kế > Chỉnh sửa HTML, có thể Mở rộng mẫu tiện ích.

2. Tìm thẻ đóng </head>, dán đoạn code bên dưới vào trên nó.


<style>
/*
Resets defualt browser settings
reset.css
*/
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a, abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small, strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend, table,caption,tbody,tfoot,thead,tr,th,td { margin:0; padding:0; border:0; outline:0; font-weight:inherit; font-style:inherit; font-size:100%; font-family:inherit; vertical-align:baseline; }
:focus { outline:0; }
a:active { outline:none; }
body { line-height:1; color:black; background:white; }
ol,ul { list-style:none; }
table { border-collapse:separate; border-spacing:0; }
caption,th,td { text-align:left; font-weight:normal; }
blockquote:before,blockquote:after,q:before,q:after { content:""; }
blockquote,q { quotes:"" ""; }
/*
Page style
*/
body {
font:normal 62.5%/1.5 Helvetica, Arial, sans-serif;
letter-spacing:0;
color:#434343;
padding:20px 0;
position:relative;
text-shadow:0 1px 0 rgba(255,255,255,.8);
-webkit-font-smoothing: subpixel-antialiased;
}
#container {
width:580px;
padding:10px;
margin:0 auto;
position:relative;
z-index:0;
}
#example {
width:600px;
height:350px;
position:relative;
}
#ribbon {
position:absolute;
top:-3px;
left:-15px;
z-index:500;
}
#frame {
position:absolute;
z-index:0;
width:739px;
height:341px;
top:-3px;
left:-80px;
}
#slides {
position:absolute;
top:15px;
left:4px;
z-index:100;
}
/*
Slides container
Important:
Set the width of your slides container
Set to display none, prevents content flash
*/
.slides_container {
width:570px;
overflow:hidden;
position:relative;
display:none;
}
/*
Each slide
Important:
Set the width of your slides
If height not specified height will be set by the slide content
Set to display block
*/
.slides_container div.slide {
width:570px;
height:270px;
display:block;
}
/*
Next/prev buttons
*/
#slides .next,#slides .prev {
position:absolute;
top:107px;
left:-39px;
width:24px;
height:43px;
display:block;
z-index:101;
}
#slides .next {
left:585px;
}
/*
Pagination
*/
.pagination {
margin:26px auto 0;
width:100px;
}
.pagination li {
float:left;
margin:0 1px;
list-style:none;
}
.pagination li a {
display:block;
width:12px;
height:0;
padding-top:12px;
background-image:url(http://saibaba.googlecode.com/files/pagination.png);
background-position:0 0;
float:left;
overflow:hidden;
}
.pagination li.current a {
background-position:0 -12px;
}
/*
Caption
*/
.caption {
z-index:500;
position:absolute;
bottom:-35px;
left:0;
height:30px;
padding:5px 20px 0 20px;
background:#000;
background:rgba(0,0,0,.5);
width:540px;
font-size:1.3em;
line-height:1.33;
color:#fff;
border-top:1px solid #000;
text-shadow:none;
}
/*
Footer
*/
#footer {
text-align:center;
width:580px;
margin-top:9px;
padding:4.5px 0 18px;
border-top:1px solid #dfdfdf;
}
#footer p {
margin:4.5px 0;
font-size:1.0em;
}
/*
Anchors
*/
a:link,a:visited {
color:#599100;
text-decoration:none;
}
a:hover,a:active {
color:#599100;
text-decoration:underline;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="http://slidesjs.com/examples/images-with-captions/js/slides.min.jquery.js"></script>
<script>
$(function(){
$('#slides').slides({
preload: true,
preloadImage: 'http://saibaba.googlecode.com/files/sloading.gif',
play: 5000,
pause: 2500,
hoverPause: true,
animationStart: function(current){
$('.caption').animate({
bottom:-35
},100);
if (window.console && console.log) {
// example return of current slide number
console.log('animationStart on slide: ', current);
};
},
animationComplete: function(current){
$('.caption').animate({
bottom:0
},200);
if (window.console && console.log) {
// example return of current slide number
console.log('animationComplete on slide: ', current);
};
},
slidesLoaded: function() {
$('.caption').animate({
bottom:0
},200);
}
});
});
</script>


3. Để hiển thị slide, bạn chỉ copy và dán đoạn code bên dưới vào nơi mà bạn muốn hiển thị Slide.


<div id="container">
<div id="example">
<div id="slides">
<div class="slides_container">
<div class="slide">
<a href="http://www.flickr.com/photos/jliba/4665625073/" target="_blank" title="145.365 - Happy Bokeh Thursday! | Flickr - Photo Sharing!"><img alt="Slide 1" height="270" src="http://slidesjs.com/examples/images-with-captions/img/slide-1.jpg" width="570" /></a>
<div class="caption" style="bottom: 0;">
Happy Bokeh Thursday!</div>
</div>
<div class="slide">
<a href="http://www.flickr.com/photos/stephangeyer/3020487807/" target="_blank" title="Taxi | Flickr - Photo Sharing!"><img alt="Slide 2" height="270" src="http://slidesjs.com/examples/images-with-captions/img/slide-2.jpg" width="570" /></a>
<div class="caption">
Taxi</div>
</div>
<div class="slide">
<a href="http://www.flickr.com/photos/childofwar/2984345060/" target="_blank" title="Happy Bokeh raining Day | Flickr - Photo Sharing!"><img alt="Slide 3" height="270" src="http://slidesjs.com/examples/images-with-captions/img/slide-3.jpg" width="570" /></a>
<div class="caption">
Happy Bokeh raining Day</div>
</div>
<div class="slide">
<a href="http://www.flickr.com/photos/b-tal/117037943/" target="_blank" title="We Eat Light | Flickr - Photo Sharing!"><img alt="Slide 4" height="270" src="http://slidesjs.com/examples/images-with-captions/img/slide-4.jpg" width="570" /></a>
<div class="caption">
We Eat Light</div>
</div>
<div class="slide">
<a href="http://www.flickr.com/photos/bu7amd/3447416780/" target="_blank" title="%u201CI must go down to the sea again, to the lonely sea and the sky; and all I ask is a tall ship and a star to steer her by.%u201D | Flickr - Photo Sharing!"><img alt="Slide 5" height="270" src="http://slidesjs.com/examples/images-with-captions/img/slide-5.jpg" width="570" /></a>
<div class="caption">
%u201CI must go down to the sea again, to the lonely sea and the sky...%u201D</div>
</div>
<div class="slide">
<a href="http://www.flickr.com/photos/streetpreacher/2078765853/" target="_blank" title="twelve.inch | Flickr - Photo Sharing!"><img alt="Slide 6" height="270" src="http://slidesjs.com/examples/images-with-captions/img/slide-6.jpg" width="570" /></a>
<div class="caption">
twelve.inch</div>
</div>
<div class="slide">
<a href="http://www.flickr.com/photos/aftab/3152515428/" target="_blank" title="Save my love for loneliness | Flickr - Photo Sharing!"><img alt="Slide 7" height="270" src="http://slidesjs.com/examples/images-with-captions/img/slide-7.jpg" width="570" /></a>
<div class="caption">
Save my love for loneliness</div>
</div>
</div>
<a class="prev" href="#"><img alt="Arrow Prev" height="43" src="http://saibaba.googlecode.com/files/arrow-prev.png" width="24" /></a>
<a class="next" href="#"><img alt="Arrow Next" height="43" src="http://saibaba.googlecode.com/files/arrow-next.png" width="24" /></a>
</div>
<img alt="Example Frame" height="341" id="frame" src="http://saibaba.googlecode.com/files/example-frame.png" width="739" />
</div>
</div>

4. Thay thế các dòng chữ màu đỏxanhxanh láhồng mà bạn muốn hiển thị. Lưu Temp và tận hưởng kết quả. Chúc thành công.

Copyright 2009 Simplex Celebs All rights reserved Designed by SimplexDesign