How to change the cell border color by moving the mouse over the table

高洛峰
Release: 2017-03-17 10:16:03
Original
3266 people have browsed it

The table definesborder-collapse:collapse; The borders will be merged into a single border. Theborder-spacingandempty-cellsproperties are ignored.

Use td:hover, incomplete display

How to change the cell border color by moving the mouse over the table

After searching for a long time, I didn’t find a good method, and using left and right borders is not perfect either.

So I was thinking about adding a pseudo element after when moving it up, with absolute positioning.


Definition and usage


:after pseudo-element adds content after the element.

This pseudo-element allows creators to insert generated content at the end of the element's content. By default, this pseudo-element is inline, but this can be changed using the attributedisplay.

Note: Internet Explorer 8 (and later) supports the content attribute if !DOCTYPE is specified.


nbsp;html>border-hover 

Copy after login
周一 周二 周三 周四 周五 周六 周日

星期

星期

星期

星期


Display:

How to change the cell border color by moving the mouse over the table

Reminder:

1. I didn’t merge columns when I started doing it. Merging rows is simpler and you don’t need to add height.

The above is the detailed content of How to change the cell border color by moving the mouse over the table. 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
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!