0
Q
背景覆盖文字
A
回答
3
下面是相关的CSS:
a {
color: #CCCCCC;
}
a:hover {
background-color: #CCCCCC;
}
正如你所看到的,字体颜色和背景颜色是上悬停相同。 Z指数与它无关。在:hover
上更改color
,您将看到如下所示的文本:http://jsfiddle.net/yVdvx/
0
更改此CSS代码。
来源:
a {
z-index: 10000;
text-decoration: none;
border-bottom: 1px dotted #666666;
color: #CCCCCC;
-webkit-transition: 0.25s ease;
transition: 0.25s ease;
}
a:hover {
background-color: #CCCCCC;
opacity: .9;
-webkit-transition: 0.25s ease;
transition: 0.25s ease;
}
要(我的例子做:悬停颜色为蓝色):
a {
z-index: 10000;
text-decoration: none;
border-bottom: 1px dotted #666666;
color: #CCCCCC;
-webkit-transition: 0.25s ease;
transition: 0.25s ease;
}
a:hover {
background-color: blue;
color: #393434;
opacity: .9;
-webkit-transition: 0.25s ease;
transition: 0.25s ease;
}
此外,它可能是好的,包括在一个单独的文件中的CSS代码,并加载它HTML文件。
相关问题
- 1. 覆盖覆盖背景图片的顶部的清晰文字?
- 2. 背景图像覆盖背景颜色
- 3. 覆盖CSS背景属性
- 4. 覆盖背景颜色
- 5. 背景图像覆盖JComponents
- 6. Sencha覆盖没有背景
- 7. HTML CSS背景覆盖
- 8. 背景图像覆盖css
- 9. 背景:cover覆盖div
- 10. Div与背景覆盖
- 11. 覆盖CSS背景图像
- 12. CSS背景覆盖图像
- 13. 背景图像覆盖
- 14. 背景覆盖在引导
- 15. 背景未覆盖整页
- 16. HTML/CSS:背景覆盖
- 17. 覆盖背景颜色的文字隐藏Android上的图像?
- 18. jquery悬停︰淡出背景与文字覆盖
- 19. 背景大小覆盖IE11不覆盖全区域
- 20. jquery覆盖背景调暗不覆盖解除覆盖后的IE9
- 21. 全屏缩放背景图像覆盖
- 22. 背景大小:覆盖滞后
- 23. IE7/8修复背景大小:覆盖
- 24. HTML/CSS中的背景覆盖格式
- 25. 覆盖div不显示背景颜色
- 26. 悬停时的背景覆盖
- 27. Android:在背景上覆盖位图
- 28. 转移背景覆盖悬停
- 29. 视频背景网格覆盖问题
- 30. 背景并不完全覆盖