1

Web サイト用に非常に基本的なスプラッシュ ページをセットアップしました。Javascript を使用して、ユーザーがサイトへのリンクにカーソルを合わせると、本文の背景が変わるように設定しました。私が今やりたいことは、切り替えの間にフェードトランジションを追加することです(現時点ではジャンプするだけです)

これは以下の私のスクリプトです

<!--

var backImage = new Array(); 
backImage[0] = "splashbackground.jpg";
backImage[1] = "backgroun3.jpg";

function setBackground() { <!--sets the default background for the page//-->
  if (document.body) {
  document.body.style.backgroundImage = 'url("splashbackground.jpg")';
 }
}
function changeBGImage(whichImage){ <!--fist background change onMouseOver event//-->
  if (document.body){
  document.body.style.backgroundImage = 'url("backgroun3.jpg")';

}
}

function changeBGImage2(whichImage){<!-- changes background back onMouseOut event//-->
if (document.body){
document.body.style.backgroundImage = 'url("splashbackground.jpg")';

}
}

4

0 に答える 0