问题描述
大家好,
因为我想在页面页脚内部的链接颜色
(,
我选择它作为div的后代元素:
这里是代码(或访问
)
div.Footer a {
颜色:#f9bddb;
text-decoration:none ;
}
a:link {color:#9C1350; text-decoration:none;}
a:visited {color:#9C1350; text-decoration:none;}
a:hover {text-decoration:underline; background-color:#E181AD;
}
a:active {color:Maroon; text-decoration:none;}
---
在Mozilla中,div.Footer中链接的颜色变为
预计,但IE似乎忽略了这一点。有没有办法如何在IE中实现颜色变化?
TIA,
-
亲切的问候,
tomasio
描述问题揭示了解决问题的方法
不确定你想做什么,但这样的事情可能是一个
解决方案:
a:链接,
a:已访问,
a:悬停,
a:活跃
{
...
}
a:hover
{
...
}
a.Footer:悬停,
a.Footer:link,
a.Footer:已访问,
a.Footer:活动
{
...
}
请注意,CSS区分大小写,因此它必须是< div
class =" Footer"> ... < / DIV>在您的HTML中也是如此。
-
Google Blogoscoped
IE6,Opera 7和Mozilla 1.6中的颜色相同。哪个版本的IE在
操作系统给你一个问题?
史蒂夫
-
我的理论给你起见,我的异端邪说激怒了你,
我从不回信,你不喜欢我的领带。 - 医生
Steve Pugh< st *** @ pugh.net> < http://steve.pugh.net/>
您好philipp,
感谢您的快速回复。我想要的是在div.Footer中给出
超链接的另一种颜色,而不是文件中剩下的
中的链接。关于eric meyer的书(CSS - Definitive
指南)你的方法是正确的,但它不起作用:既不是在
mozilla也不是在IE中。也许它必须对级联做一些事情,或者说/ b $ b div.Footer是否嵌套在另一个div中?
大多数是一些愚蠢的问题:(
-
亲切的问候,
tomasio
描述一个问题揭示了解决问题的方法
hi all,
As I want the color of a:link inside the footer of my page
(http://tomasio.laudatio.com/jobs/Cla...d_beauty.html),
I selected it as descendant element of the div:
here''s the code (or visit
http://tomasio.laudatio.com/jobs/Cla...stylesheet.css)
div.Footer a {
color: #f9bddb;
text-decoration: none;
}
a:link {color: #9C1350; text-decoration: none;}
a:visited {color: #9C1350; text-decoration: none;}
a:hover{text-decoration: underline; background-color: #E181AD;
}
a:active {color: Maroon; text-decoration: none;}
---
In Mozilla the color of the link inside div.Footer changes as
expected, but IE seems to ignore this. Is there a way how to achieve
the color change in IE also?
TIA,
--
kind regards,
tomasio
"describing an issue reveals the way to solve it"
Not sure what you want to do, but something like this might be a
solution:
a:link,
a:visited,
a:hover,
a:active
{
...
}
a:hover
{
...
}
a.Footer:hover,
a.Footer:link,
a.Footer:visited,
a.Footer:active
{
...
}
Note that CSS is case-sensitive so it must be <div
class="Footer">...</div> in your HTML as well.
--
Google Blogoscoped
http://blog.outer-court.com
Same colour in IE6, Opera 7 and Mozilla 1.6. Which version of IE on
which OS is giving you a problem?
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don''t like my tie." - The Doctor
Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Hi philipp,
thank you for your quick response. what i want is to give the
hyperlinks in div.Footer another color than the links in the rest of
the document. regarding to the book of eric meyer (CSS - Definitive
Guide) your approach is correct, but it does not work: neither in
mozilla nor in IE. maybe it has to do something with the cascade, or
that div.Footer is nested in another div?
Most be some stupid issue :(
--
kind regards,
tomasio
"describing an issue reveals the way to solve it"
这篇关于在Internet Explorer中选择伪类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!