gpt4 book ai didi

html - 当鼠标指针悬停在表格行上时更改表格颜色

转载 作者:太空宇宙 更新时间:2023-11-04 10:28:57 24 4
gpt4 key购买 nike

我使用这段代码来设置 html5 表格的样式。当我将鼠标指针移到表格行上时如何更改行颜色。当我将更多鼠标指针悬停在表格行上时,我想更改表格颜色。

.table th,
.table td {
padding-left: 5px;
padding-right: 10px;
padding-top: 7px;
padding-bottom: 7px;
}

.new_table th,
.new_table td {
padding-right: 40px;
padding-top: 7px;
padding-bottom: 7px;
}

.table th {
background-color: #eceef1;
padding-top: 5px;
padding-bottom: 5px;
}

最佳答案

你是说 :hover 吗?

.table tr:hover {
background-color: red;
}

关于html - 当鼠标指针悬停在表格行上时更改表格颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36635002/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com