1. 程式人生 > >CSS 滑鼠經過時改變table所在行的顏色

CSS 滑鼠經過時改變table所在行的顏色

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow

也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!

               

<html><head><style type="text/css">#customers  {  font-family:"Trebuchet MS"
, Arial, Helvetica, sans-serif;  width:100%border-collapse:collapse;  }#customers td, #customers th   {  font-size:1emborder:1px solid #98bf21padding:3px 7px 2px 7px;  }#customers th   {  font-size:1.1emtext-align:left;  padding-top
:5pxpadding-bottom:4pxbackground-color:#A7C942color:#ffffff;  }
</style></head><body><table id="customers"><tr><th>Company</th><th>Contact</th><th>Country</th></tr><tr onmouseover="style.backgroundColor='#FF9900'"
onmouseout="style.backgroundColor='#FFFFFF'">
<td>Apple</td><td>Steven Jobs</td><td>USA</td></tr><tr class="alt"><td>Baidu</td><td>Li YanHong</td><td>China</td></tr><tr onmouseover="style.backgroundColor='#FF9900'" onmouseout="style.backgroundColor='#FFFFFF'"><td>Google</td><td>Larry Page</td><td>USA</td></tr><tr class="alt" onmouseover="style.backgroundColor='#FF9900'" onmouseout="style.backgroundColor='#FFFFFF'"><td>Lenovo</td><td>Liu Chuanzhi</td><td>China</td></tr><tr onmouseover="style.backgroundColor='#FF9900'" onmouseout="style.backgroundColor='#FFFFFF'"><td>Microsoft</td><td>Bill Gates</td><td>USA</td></tr><tr class="alt" onmouseover="style.backgroundColor='#FF9900'" onmouseout="style.backgroundColor='#FFFFFF'"><td>Nokia</td><td>Stephen Elop</td><td>Finland</td></tr></table></body></html>


           

給我老師的人工智慧教程打call!http://blog.csdn.net/jiangjunshow

這裡寫圖片描述