【发布时间】:2017-12-19 13:16:37
【问题描述】:
我想将 CSS 类 washes_times_links 应用于下面的 html,但由于某种原因它不起作用。
.washes_times_links a {
display: block;
padding: 15px;
padding: 13px;
text-align: center;
color: #3b524b;
font-size: 15px;
text-transform: capitalize;
}
.washes_times_links a:nth-child(odd) {
background-color: #fff;
}
.washes_times_links a:last-child {
border-radius: 0 0 5px 5px
}
.washes_times_links a:hover {
color: #fff;
background-color: #12be9c;
}
<p class="washes_times_links">
<a href="http://hairactivation.com/male-hairloss-treatment/#wash-hair-less-5-days-week">1 time a week</a>
<a href="http://hairactivation.com/male-hairloss-treatment/#wash-hair-less-5-days-week">2 times a week</a>
</p>
【问题讨论】:
-
我刚刚将您的示例代码转换为 StackSnippet,它工作正常。您确定您正确加载了 CSS 文件吗?
-
这在什么方面不起作用,规则似乎在您的示例中按预期应用?
-
“不工作”不是问题的技术描述。