27 April 2011

Tutorial : Slide Float Widget


Assalamualaikum! Hari ni Tutorial kedua Kihah. Kihah akan menagajar anda cara nak buat Widget yang Terapung or Slide Float Widget.


1. Dashboard > Design > Add Gadget > Html/JavaScript

2. Copy and paste kod di bawah , dan paste di ruangan html tadi tu ;)

<style type="text/css">
#at{
position:fixed;
right:450px;
z-index:+1000;
}
* html #at{position:relative;}
.attab{
height:100px;
width:30px;
float:left;
cursor:pointer;
background:url();
}
.atcontent{
float:left;
border:2px solid #ff0000;
background:url() #000000 repeat-x bottom center scroll ;
-moz-border-radius-topleft:15px;
-moz-border-radius-topright:15px;
-moz-border-radius-bottomleft:15px;
-moz-border-radius-bottomright:15px;
padding:10px;
}
</style>
<script type="text/javascript">
function showHideAT(){
var at = document.getElementById("at");
var w = at.offsetWidth;
at.opened ? moveAT(0, -200-w) : moveAT(20-w, 0);
at.opened = !at.opened;
}
function moveAT(x0, xf){
var at = document.getElementById("at");
var dx = Math.abs(x0-xf) > 25 ? 35 : 1;
var dir = xf>x0 ? 1 : -1;
var x = x0 + dx * dir;
at.style.top = x.toString() + "px";
if(x0!=xf){setTimeout("moveAT("+x+", "+xf+")", 10);}
}
</script>
<div id="at">
<div class="attab" onclick="showHideAT()"> </div>
<div class="atcontent">
<div align="center">
<div style="background:url() no-repeat;">

kod (shoutbox,livestream Facebook,exchange link,banner dll) anda


</div>
</div>

<br />
<div align="right"><a href="javascript:void(0);" onclick="showHideAT()"><img border="0" src="http://3.bp.blogspot.com/_LhHZAifMoFE/TN6myUsdsZI/AAAAAAAAC-Q/VqSys0LrD3o/s1600/close_button.gif" alt="close" title="Close" /></a></div>
<br><div align="right"><font size="3"><a href="http://wanhazel.blogspot.com/"><div style="color: #FF0000;">
<span ></span></div></a></font></div>
</div></div></div>


<script type="text/javascript">
var at = document.getElementById("at");
at.style.top = (-200-at.offsetWidth).toString() + "px";
</script></center>
**#000000 korang leh ubah warna..cari kod HTML warna..

**kod (shoutbox,livestream Facebook,exchange link,banner dll) anda

**Pastikan nilai tidak melebihi width: 580px; height: 380px.

3. Da siap . SAVE ! :)

Tak HABIS Lagi la! Kalau tak letak kod ni, macam mana nak buka Widget tady?.

1. Dashboard > Design > Add Gadget > Html/JavaScript

2. Copy kod di bawah , dan pastekan di ruangan html tadi tuh :

<style type='text/css'>
a.linkopacity img {
filter:alpha(opacity=50);
-moz-opacity: 0.5;F
opacity: 0.5;
-khtml-opacity: 0.5;}

a.linkopacity:hover img {
filter:alpha(opacity=100);
-moz-opacity: 1.0;
opacity: 1.0;
-khtml-opacity: 1.0; }
</style>

<div style='display:scroll; position:fixed; top:220px; right:-0px;'>
<a href="javascript:void(0);"onclick="showHideAT()"/><img class="expando" width="180" height="180"src="http://s2.kimag.es/share/38953289.png" alt="PUSH" title="KLIK ME"/></a>

</div>
** Yang warna merah tuh , korang boleh tukarkan gambar yang lain oke ?:)

3 . Da siap . SAVE ! :) 

Credit : Akak Lyssa
author image

FAQIHAH HUSNI

Hi! I'm the writer and author of this webpage. Currently studying in SM Sains Kubang Pasu or know as KUPSIS in Kedah. A Kedahan girl for sure! 2017 is my senior year there and I'm fighting to 9A+ in SPM. Do pray the good result for me and others 1317 warriors. Thank you for your time :)

No comments:

Post a Comment

Budi Bahasa Budaya Kita