直接變換背景圖片

<div><a onMouseOver="this.style.background='url(images/Store/Dele/BtnPICTraceGreen.jpg)';" onMouseOut="this.style.background='none';" href="">加入追蹤</a></div>

 

.PICTrace { display:inline-block; float:left; margin-left:10px; background:url(../images/Store/BtnPICTrace.jpg) no-repeat;}
.PICTrace a { display:block; width:68px; height:21px; text-indent:-5000px;}


===============================================

<style type="text/css">
<!--
.out {border:1px solid #fff;text-align:center}
.over {border-style:solid; border-width:1px; border-color:#fff #333 #333 #fff; text-align:center}
.down {border-width:1px; border-style:solid; border-color:#333 #fff #fff #333; text-align:center;padding:2px 0px 0px 2px}
-->
</style>


<a  onmouseover="this.className='over'" onmouseout="this.className='out'" onmousedown="this.className='down'" > TEXT </a>

onmouseover="this.className='over'" 滑鼠移至
onmouseout="this.className='out'" 滑鼠移出
onmousedown="this.className='down'" 按下滑鼠

參考網址:
http://www.hsiu28.net/style/article_detail.php?id=5

創作者介紹
創作者 Rita 的頭像
Rita

Watermeloner

Rita 發表在 痞客邦 留言(0) 人氣()