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

Using docker command does not require sudo

Because the docker daemon needs to bind to the ho...

Markup Language - Phrase Elements

Click here to return to the 123WORDPRESS.COM HTML ...

7 Ways to Write a Vue v-for Loop

Table of contents 1. Always use key in v-for loop...

Some experience sharing on enabling HTTPS

As the domestic network environment continues to ...

Adobe Brackets simple use graphic tutorial

Adobe Brackets is an open source, simple and powe...

Ubuntu 20.04 how to modify the IP address example

illustrate: Today, when continuing the last offic...

How to use CSS to center a box horizontally and vertically (8 methods)

Original code: center.html : <!DOCTYPE html>...

Handwritten Vue2.0 data hijacking example

Table of contents 1: Build webpack 2. Data hijack...

Springboot+VUE to realize login and registration

This article example shares the specific code of ...

Design and implementation of Vue cascading drop-down box

Table of contents 1. Database design 2. Front-end...

How to implement the observer pattern in JavaScript

Table of contents Overview Application scenarios ...

Detailed explanation of persistent storage of redis under docker

In this chapter, we will start to operate redis i...

Basic principles for compiling a website homepage

1. The organizational structure of the hypertext d...