I had a table, inside the tr there are td which there is a link. well, i want to make a class that can change the color the link inside the td. here is my code:
<style>
.dihover{transition: .5s;}
.dihover:hover{background-color:#B7192A; color: white; cursor: pointer;}
a.setan{color:#7E7E7E;}
.setan:hover{color:white;}
tr.dihover a:hover{color:white;}
</style>
<table>
<tr class="dihover">
<td><a class="setan">this supposed to change colors</a></td>
<td><a class="setan">this supposed to change colors</a></td>
</tr>
</table>
what did i do wrong? Thank you in advance!
答案 0 :(得分:1)
我尝试修改您的代码..检查是否符合您的要求 的 HTML 强>
class Parent {
public:
static std::string getName() {
return s_name;
}
const static std::string s_name;
};
class Bar1 : public Parent {
public:
Bar1() : s_name("Bar1") {}
};
class Bar2 : public Parent {
public:
Bar2() : s_name("Bar2") {}
};
int main() {
Bar1 b;
b.getName();
return 0;
}
的 CSS 强>
<table>
<tr class= setan>
<td><a>this supposed to change colors</a></td>
<td><a>this supposed to change colors</a></td>
</tr>