admin管理员组文章数量:1386766
I am using the Shamrock theme and I am happy with link colours on the main page however when you go into a blog post and hover over any links within the body they are red.
I have tried multiple things with CSS (after hours of googling as I do not know CSS) and without using !important and therefore changing ALL links I can't get just the links within the blog posts to change when hovering over them.
Is anyone able to help with this, please?
I am using the Shamrock theme and I am happy with link colours on the main page however when you go into a blog post and hover over any links within the body they are red.
I have tried multiple things with CSS (after hours of googling as I do not know CSS) and without using !important and therefore changing ALL links I can't get just the links within the blog posts to change when hovering over them.
Is anyone able to help with this, please?
Share Improve this question asked May 4, 2020 at 19:29 chxrlotterosechxrlotterose 11 bronze badge 1- I would like the links to be this colour when hovering, #e164af – chxrlotterose Commented May 4, 2020 at 19:30
3 Answers
Reset to default 0Found the answer! For anyone else with the this question, this worked for me:
.entry-content a:not(.more-link):not(.wp-block-button__link):hover {
color: blue;
}
Change colour for one you prefer :)
You can use the page ID then set the class to reflect it.
For example:
body.page-id-1,body.page-id-2,body.page-id-3 {
background-color: green !important;
}
You can use the body class to nesting each anchor tag.
This is for the blog post page:
.blog a:hover {
color: #e164af;
}
And, this is for the blog post detail pages:
.single a:hover {
color: #e164af;
}
本文标签: cssHow to change hover link colour for blog post (body) text only
版权声明:本文标题:css - How to change hover link colour for blog post (body) text only 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744498767a2609192.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论