html - 超链接格式/颜色问题

标签 html css

我正在尝试更改特定页面上超链接的颜色 http://www.e-rotaryofwalesandwest.org/about/how-to-join .由于背景颜色不同,我需要更改超链接颜色。否则,它将不可见。

我已经设置了一个名为 .howtojoin 的 css 类

我已将 CSS 样式表添加到子主题,但它不起作用。我做错了什么?

CSS

a.howtojoin:link {color:#ffffff;}
a.howtojoin:visited {color:#cccccc;}
a.howtojoin:hover {color:#ffcc00;}

HTML

<div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left howtojoin et_pb_text_1">

<p>An Exisiting Rotarian? Thinking of Transferring? Too Busy to attend a more traditional club? Work getting in the way? Attend the weekly online meetings from the comfort of your home or wherever suits. Discuss and exchange ideas with others on our forums. If time is limited but you still want to serve our e-Club is for you.</p>
<p>If you are an existing Rotarian and want makeup your hours by attending our online meetings. Contact us (below) and for no charge* you can join one of our online meetings for your <a href="http://www.e-rotaryofwalesandwest.org/about/e-makeup/">Rotary e-Makeup</a>. That's the beauty of an online Rotary e-Club!</p>
<p>*Subject to change.</p>

</div>

在我的辩护中,我一直在研究和查看 youtube 等,但仍然一无所知。因此,不得已,我在这里请教各位专家。我不是一个只问一切而不先尝试自己解决的人。

干杯,

克里斯托夫

最佳答案

将 CSS 更改为:

.howtojoin a:link {color:#ffffff;}
.howtojoin a:visited {color:#cccccc;}
.howtojoin a:hover {color:#ffcc00;}

遇到的第一个选择器是 .howtojoin,然后是链接 (a)。

关于html - 超链接格式/颜色问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32105907/

相关文章:

html - Backbone.js 链接模型和 View

html - 垂直对齐内联 block 列表项中的内容

html - CSS radio 选中的标签唯一颜色

css - Div 在父 block 中对齐

jquery - html5 filereader - 我如何手动创建文件列表?

css - 具有相同自动高度的 2 列 div

css - float 不能正常工作

html - 在电子邮件模板中,邮件自动删除指针事件 : none in class

javascript - 如何使div静态化,这样如果屏幕有两个大它就不会跳起来

html - 如何在 Angular Material 步进器中用 mat-chip 替换下一个按钮?