问题是我有一个没有头部的面板,而博客文章就在身体内部。我已成功将代码添加到正文以影响链接的文本修饰,但无法在css中找到标记。
<div class = "panel panel-default panel-body">
<article class = "post">
<h2><a href = "<?php the_permalink(); ?>" style="text-decoration: none"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
</article>
</div>
提前致谢 史蒂芬
答案 0 :(得分:0)
您可以使用一些 CSS组合器:
.post h2 a {
text-decoration: none;
}
这将选择a
标记内的所有h2
标记,这些标记是post
类元素的子级。