访问过的链接有问题 [英] Problem with visited links

查看:41
本文介绍了访问过的链接有问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿。


我在主页上使用css样式表遇到问题

http://w1.193.telia.com/~u19305515/test/testis.html)。如您所见,

链接在未访问时根据样式表工作。但是当访问链接

时,样式表对链接没有影响。基本上,我的

问题的全部意义在于,我希望我的访问链接在

悬停中加下划线,就像没有访问时一样。


我希望有人可以帮我解决这个问题!

/ Rickard


这就是我的.css文件看起来像现在:


A:活跃{

颜色:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:

强调

}

A:悬停{

颜色:#aa0050; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:

强调

}

答:链接{

颜色:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:无

}

A:已访问{

颜色:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:无

}

BODY {

颜色:#000000; FONT-FAMILY:Verdana,Arial,Helvetica; FONT-SIZE:8pt;

}


#PCL {

font-family:Verdana,Arial,Helvetica;

font-style:none;

font-weight:normal;

text-decoration:none;

font-大小:8pt;

}


#PTT {

font-family:Verdana,Arial,Helvetica;

font-size:8pt;

}


#PST {

font-family:Verdana,Arial, Helvetica;

字体大小:8pt;

}

解决方案

RickardLindhé < RI *********** @ telia.com>写道:

我在主页上使用CSS样式表时遇到问题
http://w1.193.telia.com/~u19305515/test/testis.html) 。如您所见,
链接在未访问时根据样式表工作。但是当访问链接
时,样式表对链接没有影响。基本上,我的问题就在于,我希望我的访问链接在悬停时加下划线,就像没有访问时一样。

这就是我的意思.css文件现在看起来像:
A:活跃{
颜色:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:
强调
}
A:悬停{
颜色:#aa0050; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:
强调
}
A:链接{
颜色:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:没有
}
A:访问{
颜色:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt; TEXT-DECORATION:无
}




当多种风格的

等同的特殊性适用时,最后定义的样式优先。当链接被访问和悬停时,将使用

最后定义的样式,在您的情况下是:访问。


首选顺序是:link :访问:悬停:活跃


顺便说一句,积分是印刷媒体单位,并且在屏幕样式表中使用

真的不是很好。谷歌为许多线程解释了原因。

史蒂夫

-

我的理论给你起见,我的异端邪说激怒了你,

我从不回信,你也不喜欢我的领带。 - 医生


Steve Pugh< st *** @ pugh.net> < http://steve.pugh.net/>


2004年2月17日星期二23:21:35 GMT,RickardLindhé< ri *** ********@telia.com>

写道:

A:活跃{
颜色:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:
强调
}
A:悬停{
颜色:#aa0050; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:
强调
}
A:链接{
颜色:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:
没有
}
A:参观{
COLOR:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:
没有
}




除了史蒂夫的观点之外,我想知道这是否明智

消除了这些链接的下划线。当然,当有人徘徊时,你会发现它,但是你怎么知道将它悬停在它上面呢?在我看来这些

链接将通过愚蠢的运气。


也许你的上下文让它绝对明确地清楚

链接没有下划线,在这种情况下没关系。


Quoth the raven名为RickardLindhé:

嘿。

我在主页上使用CSS样式表时遇到问题
http://w1.193.telia.com/~u19305515/test/testis.html) 。如您所见,
链接在未访问时根据样式表工作。但是当访问链接
时,样式表对链接没有影响。基本上,我的
问题就在于,我希望我的访问链接在悬停时加下划线,就像没有访问时一样。

我希望有有人可以帮我解决这个问题!
/ Rickard

这就是我的.css文件现在的样子:

A:活跃{
颜色:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:
强调
}
A:悬停{
颜色:#aa0050; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:
强调
}
A:链接{
颜色:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:没有
}
A:访问{
颜色:#4040cc; FONT-FAMILY:Tahoma; FONT-SIZE:9pt;文字装饰:没有
}


您的序列错了。它需要链接,访问,悬停,活动。

拉斯维加斯有动物。


BODY {
颜色:# 000000; FONT-FAMILY:Verdana,Arial,Helvetica; FONT-SIZE:8pt;
}

#PCL {
font-family:Verdana,Arial,Helvetica;
font-style:none;
font-weight:normal;
text-decoration:none;
font-size:8pt;
}

#PTT {
font-family: Verdana,Arial,Helvetica;
字体大小:8pt;
}

#PST {
font-family:Verdana,Arial,Helvetica;
font-size:8pt;
}




请阅读任何告诉你Verdana的其他几十个主题

是一个馊主意?并指定font-size:100%
http: //www.xs4all.nl/~sbpoley/webmatters/verdana.html


哦,你不需要在每种风格中重复font-family。只需

将它放在身体{}中。 CSS的C级联。


-

-bts

-这个空间故意留空。


Hey.

I''m experiencing a problem using a css stylesheet on my homepage
(http://w1.193.telia.com/~u19305515/test/testis.html). As you can see, the
link works according to the stylesheet when not visited. But when the link
is visited, the stylesheet has no effect on the link. Basically, what my
problem is all about, is that I want my visited links to be underlined in
hover, just like they are when not visited.

I hope there is someone who can help me with this issue!
/Rickard

This is how my .css file looks like now:

A:active {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION:
underline
}
A:hover {
COLOR: #aa0050; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION:
underline
}
A:link {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION: none
}
A:visited {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION: none
}
BODY {
COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica; FONT-SIZE: 8pt;
}

#PCL {
font-family: Verdana,Arial,Helvetica;
font-style: none;
font-weight: normal;
text-decoration: none;
font-size: 8pt;
}

#PTT {
font-family: Verdana,Arial,Helvetica;
font-size: 8pt;
}

#PST {
font-family: Verdana,Arial,Helvetica;
font-size: 8pt;
}

解决方案

"Rickard Lindhé" <ri***********@telia.com> wrote:

I''m experiencing a problem using a css stylesheet on my homepage
(http://w1.193.telia.com/~u19305515/test/testis.html). As you can see, the
link works according to the stylesheet when not visited. But when the link
is visited, the stylesheet has no effect on the link. Basically, what my
problem is all about, is that I want my visited links to be underlined in
hover, just like they are when not visited.
This is how my .css file looks like now:

A:active {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION:
underline
}
A:hover {
COLOR: #aa0050; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION:
underline
}
A:link {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION: none
}
A:visited {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION: none
}



The last style defined takes precedence when more than one style of
equal specificity applies. When a link is both visited and hovered the
last defined style will be used, which in your case is :visited.

The preferred order is :link :visited :hover :active

BTW, points are print media units and really aren''t much good for use
in screen stylesheets. Google for the many threads explaining why.

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/>


On Tue, 17 Feb 2004 23:21:35 GMT, Rickard Lindhé <ri***********@telia.com>
wrote:

A:active {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION:
underline
}
A:hover {
COLOR: #aa0050; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION:
underline
}
A:link {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION:
none
}
A:visited {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION:
none
}



In addition to Steve''s points, I''m wondering whether it''s wise to
eliminate the underlining on these links. Sure, you dd it when someone
hovers, but how do you know it''s there to hover over it? Seems to me these
links will be followed through dumb luck.

Perhaps your context makes it absolutely and unambiguously clear where the
links are without underlining, in which case never mind.


Quoth the raven named Rickard Lindhé:

Hey.

I''m experiencing a problem using a css stylesheet on my homepage
(http://w1.193.telia.com/~u19305515/test/testis.html). As you can see, the
link works according to the stylesheet when not visited. But when the link
is visited, the stylesheet has no effect on the link. Basically, what my
problem is all about, is that I want my visited links to be underlined in
hover, just like they are when not visited.

I hope there is someone who can help me with this issue!
/Rickard

This is how my .css file looks like now:

A:active {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION:
underline
}
A:hover {
COLOR: #aa0050; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION:
underline
}
A:link {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION: none
}
A:visited {
COLOR: #4040cc; FONT-FAMILY: Tahoma; FONT-SIZE: 9pt; TEXT-DECORATION: none
}
Your sequence is wrong. It needs to be link, visited, hover, active.
"Las Vegas Has Animals."

BODY {
COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica; FONT-SIZE: 8pt;
}

#PCL {
font-family: Verdana,Arial,Helvetica;
font-style: none;
font-weight: normal;
text-decoration: none;
font-size: 8pt;
}

#PTT {
font-family: Verdana,Arial,Helvetica;
font-size: 8pt;
}

#PST {
font-family: Verdana,Arial,Helvetica;
font-size: 8pt;
}



Please read any of the other dozens of threads that tell you Verdana
is a Bad Idea? and to assign font-size: 100%
http://www.xs4all.nl/~sbpoley/webmatters/verdana.html

Oh, you do not need to repeat the font-family in every style. Just
place it once in the body {}. The C of CSS is Cascading.

--
-bts
-This space intentionally left blank.


这篇关于访问过的链接有问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆