利用2個不同背景圖片的CSS 樣式相互切換樣式
以下代碼全部復制過去就可以用,妳要做的就是分別把CSS樣式中bg和bg1中的2張圖片換成妳自己的就OK 了 長度和寬度 妳可以根據自己的需要調整
下面是代碼
<style type="text/css">
<!--
.bg {
background-image: url(bg0.jpg);
background-repeat: no-repeat;
height: 25px;
width: 149px;
}
.bg1 {
background-image: url(bg.jpg);
background-repeat: no-repeat;
height: 25px;
width: 149px;
}
-->
</style>
<table id=bgimages1 width="149" height="24" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="173" class="bg" onMouseOut="this.className='bg1'" onMouseOver="this.className='bg'"> </td>
</tr>
</table>
隨便說以下
在<table><tr>中是壹樣的調用
<table>中
<table class="bg" onMouseOut="this.className='bg1'" onMouseOver="this.className='bg'" id=bgimages1 width="149" height="24" border="1" cellpadding="0" cellspacing="0">
<tr>中
<tr class="bg" onMouseOut="this.className='bg1'" onMouseOver="this.className='bg'">