語法展示:: http://home.graffiti.net/fgbgfdsg/
請用IE6.0或更新版本觀看語法特效展示
將以下程式碼複製,貼在<body>及</body>標籤之間。
<script language="JavaScript">
<!--
if (document.all){
kg=new Image();
kg.src="figure395.gif";
document.write('<span id="rings" style="position:absolute;top:0px;left:0px">'
+'<img src="figure395.gif" name="kg" style="position:relative"></span>');
var TimeLinethree = 115;
var TimeLineTwo = 10;
var TimeLineOne = 10;
var ThreeStep = 2.1;
var TwoStep = 5.5;
var OneStep = 2.5;
var xp = 100;
var yp = 100;
function SmokeRing(){
document.all.rings.document.images["kg"].style.filter='alpha(opacity='+TimeLinethree+')';
document.all.rings.document.images["kg"].style.top=yp + (-TimeLineOne);
document.all.rings.document.images["kg"].style.left=xp + (-TimeLineOne);
document.all.rings.document.images["kg"].width=TimeLineTwo;
document.all.rings.document.images["kg"].height=TimeLineTwo;
TimeLinethree-=ThreeStep;
TimeLineTwo+=TwoStep;
TimeLineOne+=OneStep;
setTimeout('SmokeRing()',10);
if ((TimeLineTwo > 380) || (TimeLineOne > 380) || (TimeLinethree < 0))
{TimeLineTwo=0;TimeLineOne=0;TimeLinethree=85;
stop=window.document.body.clientHeight-280;
sleft=window.document.body.clientWidth/2.5;//?
yp=Math.round(Math.random()*stop);
xp=Math.round(Math.random()*sleft);
document.all.rings.style.top=yp+document.body.scrollTop;
document.all.rings.style.left=xp+document.body.scrollLeft;
}
if ((yp < 80) || (xp < 80))
{
yp+=80;
xp+=80;
} }}
if (document.all)SmokeRing();
// -->
</script>
留言列表