17 May 2010
Membuat Fancy Image Hover

Assamualaikum , Msue nak kongsi lagi ngan korang sume bagaimana nak buat Membuat Fancy Image Hover

1. Login ke Blogspot .
2. Klik Layout - Edit HTML( Tandakan pada kotak Expand widget)
3. Cari kod di bawah
]]></b:skin>
4. Copy kod dibawah
ul.thumb {
float: left;
list-style: none;
margin: 0; padding: 10px;
width: 360px;
}
ul.thumb li {
margin: 0; padding: 5px;
float: left;
position: relative;
width: 110px;
height: 110px;
}
ul.thumb li img {
width: 100px; height: 100px;
border: 1px solid #ddd;
padding: 5px;
background: #f0f0f0;
position: absolute;
left: 0; top: 0;
-ms-interpolation-mode: bicubic;
}
ul.thumb li img.hover {
background:url(thumb_bg.png) no-repeat center center;
border: none;
5. Pastekan diatasnya
6. Cari kod di bawah
</head>
7. Copy kod dibawah
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>
$(document).ready(function(){
//Larger thumbnail preview
$("ul.thumb li").hover(function() {
$(this).css({'z-index' : '10'});
$(this).find('img').addClass("hover").stop()
.animate({
marginTop: '-110px',
marginLeft: '-110px',
top: '50%',
left: '50%',
width: '174px',
height: '174px',
padding: '20px'
}, 200);
} , function() {
$(this).css({'z-index' : '0'});
$(this).find('img').removeClass("hover").stop()
.animate({
marginTop: '0',
marginLeft: '0',
top: '0',
left: '0',
width: '100px',
height: '100px',
padding: '5px'
}, 400);
});
//Swap Image on Click
$("ul.thumb li a").click(function() {
var mainImage = $(this).attr("href"); //Find Image Name
$("#main_view img").attr({ src: mainImage });
return false;
});
});
</script>
8. Pastekan diatasnya
9. Preview dan save template
Untuk Memasuk Pada Posting
1. Klik New Post
2. Copy kod dibawah
<ul class="thumb">
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
</ul>
Note:Tukarkan pada highlight merah diatas
3. Pastekan kedalamnya
4. Klik Publish post

1. Login ke Blogspot .
2. Klik Layout - Edit HTML( Tandakan pada kotak Expand widget)
3. Cari kod di bawah
]]></b:skin>
4. Copy kod dibawah
ul.thumb {
float: left;
list-style: none;
margin: 0; padding: 10px;
width: 360px;
}
ul.thumb li {
margin: 0; padding: 5px;
float: left;
position: relative;
width: 110px;
height: 110px;
}
ul.thumb li img {
width: 100px; height: 100px;
border: 1px solid #ddd;
padding: 5px;
background: #f0f0f0;
position: absolute;
left: 0; top: 0;
-ms-interpolation-mode: bicubic;
}
ul.thumb li img.hover {
background:url(thumb_bg.png) no-repeat center center;
border: none;
5. Pastekan diatasnya
6. Cari kod di bawah
</head>
7. Copy kod dibawah
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>
$(document).ready(function(){
//Larger thumbnail preview
$("ul.thumb li").hover(function() {
$(this).css({'z-index' : '10'});
$(this).find('img').addClass("hover").stop()
.animate({
marginTop: '-110px',
marginLeft: '-110px',
top: '50%',
left: '50%',
width: '174px',
height: '174px',
padding: '20px'
}, 200);
} , function() {
$(this).css({'z-index' : '0'});
$(this).find('img').removeClass("hover").stop()
.animate({
marginTop: '0',
marginLeft: '0',
top: '0',
left: '0',
width: '100px',
height: '100px',
padding: '5px'
}, 400);
});
//Swap Image on Click
$("ul.thumb li a").click(function() {
var mainImage = $(this).attr("href"); //Find Image Name
$("#main_view img").attr({ src: mainImage });
return false;
});
});
</script>
8. Pastekan diatasnya
9. Preview dan save template
Untuk Memasuk Pada Posting
1. Klik New Post
2. Copy kod dibawah
<ul class="thumb">
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
<li><a href="http://msueroomz.blogspot.com/"><img src="URL IMAGE" alt="" /></a></li>
</ul>
Note:Tukarkan pada highlight merah diatas
3. Pastekan kedalamnya
4. Klik Publish post


Tinggalkan Komen Anda Disini