Border、ボーダー、棒だー!
![]()
<style TYPE="text/css"><!--
#test1 {width:400;text-align:center;color:navy;
font:bold 18pt;
border-top:outset
red 1;
border-bottom:inset
green 20;}
--></style>
<script language="JavaScript"><!--
var topW = 1; //上側のボーダー幅
var botW = 20; //下側のボーダー幅
var flg = 0; //動作を切り換えるフラグ変数
function MoBorder(){
test1.style.borderTopWidth = topW;
test1.style.borderBottomWidth = botW;
if(flg == 0){
topW++;
//上側のボーダー幅を1増やす
botW--;
//下側のボーダー幅を1減らす
if(topW > 20){flg = 1;}
}
if(flg == 1){
topW--;
botW++
if(topW < 1){flg = 0;}
}
setTimeout("MoBorder()",100);
}
//--></script>
</head>
<body onload="MoBorder();">
<div id="test1">Border、ボーダー、棒だー!</div>
END