鼠标经过图片,图片变亮,离开图片,图片变暗,代码实现

例在<head>与</head>之间的CSS代码:

<style type="text/css">
.style1 { font-size: 12px; background: url(image/buttonbg1.gif); border: 0px; width: 60px; height: 22px}
.style2 { font-size: 12px; font-weight: bold; background: url(image/buttonbg2.gif); border: 0px 0; width: 60px; height: 22px}
</style>

  按钮 代码如下:

<input type="submit" name="Submit2" value="" onmouseover="this.className='style1'" onmouseout="this.className='style3'" class="style1">

你可能感兴趣的:(css,url,Class,input,border)