Letakan script berikut diatas tag </body>
Save terlebih dahulu, lalu lakukan cari kode<script type='text/javascript'>
//<![CDATA[
// DOM Ready
$(function() {
var originalBGMovingHighlight = $("#MovingHighlight").css("background-color"),
x, y, xy, bgWebKit, bgMoz, lightColor = "rgba(255,255,255,0.75)",
gradientSize = 100;
// Basic Demo
$('#MovingHighlight').mousemove(function(e) {
x = e.pageX - this.offsetLeft;
y = e.pageY - this.offsetTop;
xy = x + " " + y;
bgWebKit = "-webkit-gradient(radial, " + xy + ", 0, " + xy + ", " + gradientSize + ", from(" + lightColor + "), to(rgba(255,255,255,0.0))), " + originalBGMovingHighlight;
bgMoz = "-moz-radial-gradient(" + x + "px " + y + "px 45deg, circle, " + lightColor + " 0%, " + originalBGMovingHighlight + " " + gradientSize + "px)";
$(this).css({
background: bgWebKit
}).css({
background: bgMoz
});
}).mouseleave(function() {
$(this).css({
background: originalBGMovingHighlight
});
});
var originalBG = $(".nav a").css("background-color");
$('.nav li:not(".active") a').mousemove(function(e) {
x = e.pageX - this.offsetLeft;
y = e.pageY - this.offsetTop;
xy = x + " " + y;
bgWebKit = "-webkit-gradient(radial, " + xy + ", 0, " + xy + ", 100, from(rgba(255,255,255,0.8)), to(rgba(255,255,255,0.0))), " + originalBG;
bgMoz = "-moz-radial-gradient(" + x + "px " + y + "px 45deg, circle, " + lightColor + " 0%, " + originalBG + " " + gradientSize + "px)";
$(this).css({
background: bgWebKit
}).css({
background: bgMoz
});
}).mouseleave(function() {
$(this).css({
background: originalBG
});
});
});
//]]>
</script>
<b:includable id='post' var='post'>
masukin kode HTML berikut dibawah kode itu ya <div id='MovingHighlight'> Scroll kebawah cari tag penutup dari </b:includable> masukin satu tag penutup </div> tepat sebelum kode tersebut. Kalau sudah mahir dan terbiasa dengan RGBa ini, maka sobat layak mencoba menerapkan trik berikut ini Flexible Color Schemes in Layouts with RGBa.See you :-h
Tidak ada komentar:
Posting Komentar