2016-11-29 36 views
1

內鏈接的顏色,我有:變化幅度類

<span class="field-content highlight-front"> 
    <a href="/node/42" hreflang="en">This is an example</a> 
</span> 
在CSS文件

我想通過跨類改變鏈接的顏色。

.highlight-front{ 
    color: blue; 
} 

,但似乎並沒有工作。有關通過跨班級定位鏈接的任何建議或地方?

+0

'.highlight-前面{ 顏色:藍色; }' – Banzay

回答

0

您可以通過以下方式實現此目的:

<span class="field-content highlight-front"> 
    <a href="/node/42" hreflang="en">This is an example</a> 
</span> 

.highlight-front a{ 
    color: blue; 
} 

哪個顏色會發現作爲.highlight-front類的派生物。

0

在類添加.highlight-front a{指定所有a標籤內span帶班highlight-front

.highlight-front a{ 
 
    color: blue; 
 
}
<span class="field-content highlight-front"> 
 
    <a href="/node/42" hreflang="en">This is an example</a> 
 
</span>

0
you can also try this 
<span class="field-content"> 
    <a class="highlight-front" href="/node/42" hreflang="en">This is an example</a> 
</span>