jQuery Plugin
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function () {
flash('Welcome to my blog my friends, happy enjoy yaw!!!')
});
function flash(message) {
$('#flash').html(message).slideDown("slow").delay(2000).slideUp("slow");;
}
//]]>
</script>
Gantilah tulisan pada script yg diberi warna merah, dan letakan diatas/sebelum tag </body>//<![CDATA[
$(document).ready(function () {
flash('Welcome to my blog my friends, happy enjoy yaw!!!')
});
function flash(message) {
$('#flash').html(message).slideDown("slow").delay(2000).slideUp("slow");;
}
//]]>
</script>
Kode CSS
.hidden {
display:none;
}
.flash {
border-bottom: 3px solid #000;
border-left: 3px solid #000;
border-right: 3px solid #000;
-moz-border-radius-bottomright:15px;
-webkit-border-bottom-right-radius:15px;
-moz-border-radius-bottomleft:15px;
-webkit-border-bottom-left-radius:15px;
font-size:25px;
text-align:center;
position:fixed;
top:0;
left:15%;
color:#000000;
background:#FF0000;
width:800px;
padding:10px;
text-shadow:#555 0px 1px 1px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF0000', endColorstr='#FFFFFF');
background: -webkit-gradient(linear, left top, left bottom, from(#FF0000), to(#FFFFFF));
background: -moz-linear-gradient(top, #FF0000, #FFFFFF);
-moz-box-shadow:-1px -1px 1px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.2);
}
.flashs {
width:100%;
margin:0 auto;
}
Letakin diatas/sebelum kode ]]></b:skin> Setelah itu masukin juga kode HTML berikut didalam tag <body> template sobat.display:none;
}
.flash {
border-bottom: 3px solid #000;
border-left: 3px solid #000;
border-right: 3px solid #000;
-moz-border-radius-bottomright:15px;
-webkit-border-bottom-right-radius:15px;
-moz-border-radius-bottomleft:15px;
-webkit-border-bottom-left-radius:15px;
font-size:25px;
text-align:center;
position:fixed;
top:0;
left:15%;
color:#000000;
background:#FF0000;
width:800px;
padding:10px;
text-shadow:#555 0px 1px 1px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF0000', endColorstr='#FFFFFF');
background: -webkit-gradient(linear, left top, left bottom, from(#FF0000), to(#FFFFFF));
background: -moz-linear-gradient(top, #FF0000, #FFFFFF);
-moz-box-shadow:-1px -1px 1px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.2);
}
.flashs {
width:100%;
margin:0 auto;
}
<div class="flashs">
<div id="flash" class="flash hidden">
</div>
</div>
Save
Lihat hasilnya berhasil apa tidak :)Resource by: http://dailytricks.tumblr.com/
Tidak ada komentar:
Posting Komentar