內鏈接的顏色,我有:變化幅度類
<span class="field-content highlight-front">
<a href="/node/42" hreflang="en">This is an example</a>
</span>
在CSS文件
我想通過跨類改變鏈接的顏色。
.highlight-front{
color: blue;
}
,但似乎並沒有工作。有關通過跨班級定位鏈接的任何建議或地方?
內鏈接的顏色,我有:變化幅度類
<span class="field-content highlight-front">
<a href="/node/42" hreflang="en">This is an example</a>
</span>
在CSS文件
我想通過跨類改變鏈接的顏色。
.highlight-front{
color: blue;
}
,但似乎並沒有工作。有關通過跨班級定位鏈接的任何建議或地方?
你不得不在屋裏跨度着色,這意味着你的類名(跨度的孩子)之後加入a
指定元素:
使用此:
.highlight-front a{
color: blue;
}
在這裏看到:
您可以通過以下方式實現此目的:
<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
類的派生物。
在類添加.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>
you can also try this
<span class="field-content">
<a class="highlight-front" href="/node/42" hreflang="en">This is an example</a>
</span>
'.highlight-前面{ 顏色:藍色; }' – Banzay