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" border="1">
 <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>

發佈了27 篇原創文章 · 獲贊 8 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章