2016-09-18 19 views
0

事情是,我有一個面板沒有頭和博客文章裏面的正文。我已成功將代碼添加到正文以影響鏈接的文本修飾,但無法單獨在CSS中找到該標籤。如何在面板主體中的面板鏈接標記在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

你可以使用一些CSS組合子

.post h2 a { 
    text-decoration: none; 
} 

這將選擇內部h2標籤是一個元素的兒童與post類的所有a標籤。