How to change the link color in a specific class for a div CSS(如何更改 div CSS 的特定类中的链接颜色)
问题描述
在我的页面中设置了以下 CSS:
In my Page the following CSS is set:
a:link {
color: #0094DE;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #0094DE;
}
a:hover {
text-decoration: underline;
color: #DD127B;
}
我想更改分配了一个类的 div 内的链接颜色.我尝试了以下方法:
I want to Change the Link color inside a div which has a class assigned to it. I tried the following :
register:link{color:#FFFFFF;
}
其中 register 是我想要更改链接颜色的 div 的名称.我怎样才能做到这一点?另外如何更改同一div上悬停链接的颜色?
Where register is the name of the div in which i want to change the link color. How can i do that? Also how to change the color for hover link over the same div?
推荐答案
.register a:link{
color:#FFFFFF;
}
这篇关于如何更改 div CSS 的特定类中的链接颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何更改 div CSS 的特定类中的链接颜色
基础教程推荐
- Karma-Jasmine:如何正确监视 Modal? 2022-01-01
- 悬停时滑动输入并停留几秒钟 2022-01-01
- 角度Apollo设置WatchQuery结果为可用变量 2022-01-01
- 我什么时候应该在导入时使用方括号 2022-01-01
- 响应更改 div 大小保持纵横比 2022-01-01
- 当用户滚动离开时如何暂停 youtube 嵌入 2022-01-01
- 在 JS 中获取客户端时区(不是 GMT 偏移量) 2022-01-01
- 有没有办法使用OpenLayers更改OpenStreetMap中某些要素 2022-09-06
- 动态更新多个选择框 2022-01-01
- 在for循环中使用setTimeout 2022-01-01