How to change the color of the entire row (tr) when the mouse stops in HTML

How to change the color of the entire row (tr) when the mouse stops in HTML

Use pure CSS to change the background color of a row when the mouse passes over it to indicate that the row is in focus:

<html>
<head>
<meta charset="utf-8"/>
<title>change</title>
<style type="text/css">
  tr.change:hover
  {
    background-color:#00FF00
  }
</style>
</head>
<body>
<h1>Change color when the mouse is stopped</h1>
<table width="80%" border="1" align="center">
  <tr class="change">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr class="change">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>

The above is what I introduced to you about how to change the color of the entire row (tr) when the mouse stops in HTML. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

<<:  A brief analysis of JS original value and reference value issues

>>:  In-depth study of MySQL multi-version concurrency control MVCC

Recommend

mysql-8.0.17-winx64 deployment method

1. Download mysql-8.0.17-winx64 from the official...

Detailed explanation of the correct use of the count function in MySQL

1. Description In MySQL, when we need to get the ...

How to choose the right index in MySQL

Let’s take a look at a chestnut first EXPLAIN sel...

Pure HTML+CSS to achieve Element loading effect

This is the effect of the Element UI loading comp...

JS uses clip-path to implement dynamic area clipping function

background Today, I was browsing CodePen and saw ...

How to use http and WebSocket in CocosCreator

Table of contents 1. HttpGET 2. HTTP POST WebSock...

Detailed explanation of MySQL startup options and system variables examples

Table of contents Boot Options Command Line Long ...

How to create a view in MySQL

Basic syntax You can create a view using the CREA...

js to achieve the complete steps of Chinese to Pinyin conversion

I used js to create a package for converting Chin...

Detailed installation and configuration of Subversion (SVN) under Ubuntu

If you are a software developer, you must be fami...

Detailed explanation of how to pass password to ssh/scp command in bash script

Install SSHPASS For most recent operating systems...

Mysql master/slave database synchronization configuration and common errors

As the number of visits increases, for some time-...

Detailed explanation of vite2.0 configuration learning (typescript version)

introduce You Yuxi’s original words. vite is simi...