所以这是这个页面的HTML代码,我正在尝试更改“评论”链接的颜色,我该如何定位?
<p>Phasellus tincidunt tristique elit, nec scelerisque ante egestas sit amet. Nulla eu diam turpis. Etiam ac arcu nec augue sollicitudin elementum. Duis congue mauris eu augue congue commodo. Vestibulum eleifend suscipit augue, non laoreet sem interdum id. Aenean tempus odio sit amet ante malesuada posuere. Fusce dolor justo, lacinia eu varius a, tempor et arcu. Aenean in massa blandit, cursus erat sed, adipiscing orci. Morbi in odio dignissim velit dictum molestie. Phasellus leo augue, tempor a tortor et, eleifend laoreet tellus. Maecenas vel velit at arcu condimentum lobortis facilisis eu ipsum. Sed sit amet volutpat eros. </p>
<p><a href="#">Comment</a></p>
</article>
</section>
答案 0 :(得分:0)
三种方式:
<a id="whatever">
section article p a
<a class="whatever">
我建议您使用ID。这是单独链接的最佳方式。要通过id选择CSS:
#your_id:hover {
whatever-you: want;
}