IE 6和Opera 7中的活动链接 [英] active link in IE 6 and Opera 7
问题描述
您好,
我的样式表显示了访问链接,活动链接和悬停链接的不同颜色。
它在IE 6中工作正常,但在Opera 7中活动的颜色链接(红色
背景)永远不会显示。如何解释这个?
这是我的代码:(代码优化将在以后完成)
1. HTML文件
<!doctype html public" - // W3C // DTD HTML 4.01 Transitional // EN">
< html>
< head>
< title> Navigationsframe< / title>
< link rel =" stylesheet"类型= QUOT;文本/ CSS" href =" css / sew1.css">
< / head>
< body style =" background-color:#D4D0C8">
< div align =" center">< p class =" menutitle"> Inhalt< / p>
< div class =" menu01" ;>
< hr width =" 170px" >
< a class =" menu01" HREF =" main.html中" target =" main"> Startseite< / a>
< hr width =" 170px" >
< a class =" menu01" HREF =" Archivseite.html" target =" main"> :: Archive< / a>
< hr width =" 170px" >
< a class =" menu01" HREF =" Meinungsseite.html" target =" main"> Meinungsseite< / a>
< hr width =" 170px" >
< a class =" menu01" HREF =" Fotoseite.html" target =" main"> Fotoseite< / a>
< hr width =" 170px" >
< / div><! - class menutitle - >
< / div><! - align left - >
< / body>
< / html>
2. CSS文件:
a.menu01:link {
display:block;
宽度:170px;
text-decoration:none;
text-align:left;
字体:14px arial;
填充:2px 2px 2px 0;
保证金:2px 1px 1px 1px;
边框:1px白色;
border-top-style:none;
border-bottom-style:没有;
border-left-style:none;
border-right-style:none;
颜色:白色;
背景:灰色
}
a.menu01:访问过{
显示:阻止;
宽度:170px;
text-decoration:none;
text-align:left;
字体:14px arial;
填充:2px 2px 2px 0;
保证金:2px 1px 1px 1px;
边框:1px白色;
border-top- style:none;
border-bottom-style:没有;
border-left-style:none;
border-right-style:none;
颜色:白色;
背景:蓝色
}
a.menu01:有效{
显示:块;
宽度:170px;
text-decoration:none;
text-align:left;
字体:14px arial;
填充:2px 2px 2px 0;
保证金:2px 1px 1px 1px;
边框:1px白色;
border-top- style:none;
border-bottom-style:none;
border-left-style:none;
border-right-style:没有;
颜色:白色;
背景:红色
}
a.menu01:悬停{
显示:块;
宽度:170px;
text-decoration:none;
text-align:left;
字体:14px arial;
填充:2px 2px 2px 0;
保证金:2px 1px 1px 1px;
边框:1px白色;
border-top-style:none;
border-bottom-style:none;
border-left-风格:无;
边框-right-style:none;
颜色:白色;
背景:绿色
}
感谢您的帮助
Peter
Hello,
my stylesheet shows different colors for visited, active and hovered links.
It works fine in IE 6, but in Opera 7 the color for the active link (red
background) is never shown. How to explain this?
Here is my code: (code optimization will be done later)
1. The HTML file
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Navigationsframe</title>
<link rel="stylesheet" type="text/css" href="css/sew1.css">
</head>
<body style="background-color:#D4D0C8">
<div align="center"><p class="menutitle">Inhalt</p>
<div class="menu01">
<hr width="170px" >
<a class="menu01" href="main.html" target="main">Startseite</a>
<hr width="170px" >
<a class="menu01" href="Archivseite.html" target="main">: : Archive</a>
<hr width="170px" >
<a class="menu01" href="Meinungsseite.html" target="main">Meinungsseite</a>
<hr width="170px" >
<a class="menu01" href="Fotoseite.html" target="main">Fotoseite</a>
<hr width="170px" >
</div><!-- class menutitle -->
</div><!-- align left -->
</body>
</html>
2. The CSS file:
a.menu01:link{
display:block;
width:170px;
text-decoration:none;
text-align:left;
font:14px arial;
padding:2px 2px 2px 0;
margin:2px 1px 1px 1px;
border:1px white;
border-top-style:none;
border-bottom-style:none;
border-left-style:none;
border-right-style:none;
color:white;
background:grey
}
a.menu01:visited{
display:block;
width:170px;
text-decoration:none;
text-align:left;
font:14px arial;
padding:2px 2px 2px 0;
margin:2px 1px 1px 1px;
border:1px white;
border-top-style:none;
border-bottom-style:none;
border-left-style:none;
border-right-style:none;
color:white;
background:blue
}
a.menu01:active {
display:block;
width:170px;
text-decoration:none;
text-align:left;
font:14px arial;
padding:2px 2px 2px 0;
margin:2px 1px 1px 1px;
border:1px white;
border-top-style:none;
border-bottom-style:none;
border-left-style:none;
border-right-style:none;
color:white;
background:red
}
a.menu01:hover {
display:block;
width:170px;
text-decoration:none;
text-align:left;
font:14px arial;
padding:2px 2px 2px 0;
margin:2px 1px 1px 1px;
border:1px white;
border-top-style:none;
border-bottom-style:none;
border-left-style:none;
border-right-style:none;
color:white;
background:green
}
thanks for helping
Peter
推荐答案
Peter Brause写道:
Peter Brause wrote:
我的样式表显示了访问,活动和悬停
链接的不同颜色。它在IE 6中运行良好,
这令人惊讶。 IE 6在这方面是否也被打破了?
$ 7 $ b在Opera 7中,活动链接(红色背景)的颜色永远不会显示。
这是我的代码:(代码优化将在以后完成)
将来,网址会更好。
CSS文件:
a.menu01:link {
a.menu01:visited {
a.menu01:active {
a.menu01:hover {
my stylesheet shows different colors for visited, active and hovered
links. It works fine in IE 6,
That''s suprising. Is IE 6 broken in this regard, too?
in Opera 7 the color for the active link (red background) is never
shown. Here is my code: (code optimization will be done later)
In the future, a url is better.
The CSS file:
a.menu01:link{ a.menu01:visited{ a.menu01:active { a.menu01:hover {
锚伪样式的顺序错误。它必须是链接,
访问,悬停,活动。 (这在常见问题解答中得到解答。下次,在发布ciwas之前检查
faq,你会得到更快的答案。)
-
Brian(从我的地址中删除无效给我发电子邮件)
http://www.tsmchughs.com/
" Brian" <我们***** @ julietremblay.com.invalid> schrieb im Newsbeitrag
新闻:10 ************* @ corp.supernews.com ...
"Brian" <us*****@julietremblay.com.invalid> schrieb im Newsbeitrag
news:10*************@corp.supernews.com...
锚伪样式在错误的订单。它必须是链接,访问,悬停,活动。
The anchor pseudo styles are in the wrong order. It must be link,
visited, hover, active.
没有运气,Opera的问题仍然存在。
Peter
No luck, problem with Opera remains.
Peter
" Peter Brause" < SA ********* @ x-mail.net>写道:
"Peter Brause" <sa*********@x-mail.net> wrote:
锚伪样式的顺序错误。它必须是链接,访问,悬停,活动。
The anchor pseudo styles are in the wrong order. It must be link,
visited, hover, active.
没有运气,Opera仍有问题。
No luck, problem with Opera remains.
哪个单词将来,网址会更好。你有没有理解?b / b
更改订单_does_会影响Opera的行为。剩下的是什么?b $ b看到的正是你尝试过的方式(也就是网址)以及你究竟是什么,b $ b期望活跃链接在Opera上的意思。
-
Yucca, http://www.cs.tut.fi/~jkorpela/
这篇关于IE 6和Opera 7中的活动链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!