How to share the sample code of how to realize the color change of the entire row (tr) when the mouse is stopped in HTML

黄舟
Release: 2017-06-18 13:48:46
Original
1703 people have browsed it

This article mainly introduces the relevant information in HTML to realize the discoloration of the entire row (tr) when the mouse passes over it. Friends in need can refer to the following

Using pure CSS to realize when the mouse passes over a table When a certain line of is placed, the background color of the entire line should change to indicate that the line 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>鼠标经停变色</h1>
<table width="80%" border="1" align="center">
  <tr class="change">
    <td> </td>
    <td> </td>
  </tr>
  <tr class="change">
    <td> </td>
    <td> </td>
  </tr>
</table>
</body>
</html>
Copy after login

The above is the detailed content of How to share the sample code of how to realize the color change of the entire row (tr) when the mouse is stopped in HTML. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!