天天看點

css滑鼠經過樣式,單擊文本框樣式

<html>

<head>

<style>

.inputTxt {star : expression(

 οnfοcus=function(){this.style.backgroundColor="#FFF8DC"},

 οnblur=function(){this.style.backgroundColor="#FFFFFF"})

}

.showLineColor {

 BACKGROUND: #ffffff; COLOR: #000000; TEXT-DECORATION: none;

 star : expression(

 οnmοuseοver=function(){this.style.backgroundColor="#D0E4FD"},

 οnmοuseοut=function(){this.style.backgroundColor="#FFFFFF"})

}

</style>

</head>

<body>

<center>

<table width="800px" >

 <tr class="showLineColor">

  <td>姓名: <input type="text" class="inputTxt"/></td>

 </tr>

 <tr class="showLineColor">

  <td>手機: <input type="text" class="inputTxt"/></td>

 </tr>

 <tr class="showLineColor">

  <td>性别: <input type="text" class="inputTxt"/></td>

 </tr>

 <tr class="showLineColor">

  <td>班别: <input type="text" class="inputTxt"/></td>

 </tr>

 <tr class="showLineColor">

  <td><input type="button" value="submit"></td>

 </tr>

</table>

</center>

</body>

</html>