我想将CSS类washes_times_links
应用于下面的html,但由于某种原因,它不起作用。CSS类不适用于
.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文件吗? – Turnip
这是行不通的,规则似乎在您的示例中按预期应用? –
“不工作”不是对问题的技术描述。 – Rob