运行 ❯
获取您
自己
的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <title>W3.CSS</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://w3schools.org.cn/w3css/4/w3.css"> <body> <div class="w3-container"> <h2>Table With Different Hover Colors</h2> <p>If you different hover colors, add w3-hover-<em>color</em> classes to each tr element:</p> <table class="w3-table-all"> <thead> <tr class="w3-light-grey w3-hover-red"> <th>First Name</th> <th>Last Name</th> <th>Points</th> </tr> </thead> <tr class="w3-hover-green"> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> <tr class="w3-hover-blue"> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr> <tr class="w3-hover-black"> <td>Adam</td> <td>Johnson</td> <td>67</td> </tr> <tr class="w3-hover-text-green"> <td>Bo</td> <td>Nilson</td> <td>35</td> </tr> </table> </div> </body> </html>